█

AI/TLDR

Buy me a coffee
Buy me a coffee

Janus

Terminal coding agent built on pi that sends every request to the strongest free model that is answering, and falls back to the next when one is rate-limited

Autonomous Coding AgentsOpen source
Latest
0.3.2
Updated
26 Nov 2026
Language
JavaScript
License
MIT
$npm install -g @janus-sh/janus

What's new

0.3.226 Nov 2026

/free now says why a model is resting and when it is back, and the new janus doctor command reports keys, services and the next models. The engine moves to pi 1.6.1.

IN SHORT

What is Janus?

Janus is a coding agent for the terminal. Like the paid ones, it reads your code, edits files and runs commands, but every request goes to a free model. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in JavaScript and licensed MIT.

Updated Markdown version ↗

Overview

Janus is a coding agent for the terminal. Like the paid ones, it reads your code, edits files and runs commands, but every request goes to a free model. You give it free API keys from services such as OpenRouter, Google Gemini or Groq. Janus keeps a ranked list of free models, sends each request to the best one you have a key for that is answering, and when that model says 'not now' the same request goes to the next one.

The routing is the part Janus adds. The ranked list is a file in the repository, lib/free-models.json, downloaded fresh at start. With an OpenRouter key, Janus also reads OpenRouter's catalogue: models that stopped being free are skipped, and new free models that can use tools join the end of the list. A model that hits its rate limit rests for a minute, one that hit its daily cap rests until the cap resets, and one that breaks off mid-answer rests while the turn is retried elsewhere. The footer shows which model answered, and /free shows the whole list with why each model is resting. Janus ignores paid keys in your shell unless you set JANUS_ENV_KEYS=1, so it never spends money by accident.

The engine underneath is pi by Earendil Works, installed as a dependency: its terminal interface, tools, sessions and providers. Janus adds the free-model router, key setup and its own look. The README says the project is maintained by an AI agent that writes the code and releases, with a human holding the keys. It also warns that free tiers may use what you send to train models, so secrets should stay out of the folder you run it in. Janus needs Node.js 22.19 or newer and is MIT-licensed.

What it does

  • Routes each request to the strongest free model that is awake and that you have a key for, falling back on rate limits, daily caps and broken answers
  • Ranked free-model list kept as a file in the repository, plus a same-day check of OpenRouter's catalogue for models that stopped or started being free
  • /free shows every model as awake, resting (with the reason and when it is back) or without a key; /model picks one by hand
  • Ignores paid API keys in the environment by default, so a free agent never spends your money
  • janus doctor lists keys found (names only), reachable services, the model list and the next three models, without calling a model
  • One-shot mode (janus -p), session continue (janus -c), /compact for long conversations and !cmd for shell commands

Getting started

Janus is an npm package. It needs Node.js 22.19 or newer and at least one free API key; the README suggests starting with OpenRouter.

Install and start

Install the package globally and run janus in your project folder.

bashbash
npm install -g @janus-sh/janus
janus

Add free keys

On first run Janus asks for at least one key: OpenRouter (openrouter.ai/keys), Google Gemini (aistudio.google.com/apikey) or Groq (console.groq.com/keys). More keys mean more free requests a day and more models to fall back on. Change them any time with janus setup.

bashbash
janus setup

Work in the session

Ask for changes in plain language. Type /free to see which models are awake or resting, /model to pick one by hand (janus/free is the automatic router), /compact to shrink a long conversation and !ls to run a shell command.

Run one task, or check the setup

janus -p runs a single task and prints the answer; janus -c continues the last session. janus doctor shows the keys found, which services answer and which models would be used next.

bashbash
janus -p "fix the failing test"
janus -c
janus doctor

Commands and code are distilled from the project's own documentation — always check the official repo for the latest.

When to use it

  • Trying an agentic coding workflow without paying for a model subscription
  • Students and hobbyists working on side projects within free-tier limits
  • Keeping a coding agent usable when one free provider rate-limits, by spreading requests across several
  • A pi-based agent where the model choice is automatic rather than configured by hand

Version history

Every verified update to Janus that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.

  1. 2026-11-260.3.2

    /free now says why a model is resting and when it is back, and the new janus doctor command reports keys, services and the next models. The engine moves to pi 1.6.1.

  2. 2026-11-260.3.0

    The project takes the name Janus, with the npm package @janus-sh/janus and the janus command; settings, keys and sessions are copied over from the old folder.

How Janus compares

Janus alongside other open-source autonomous coding agents tools AI/TLDR tracks, ranked by GitHub stars.

ToolStarsWhat it does
opencode★ 230kOpenCode is an open source AI coding agent that runs in your terminal, with built-in build and plan agents and an optional desktop app.
Claude Code★ 158kAnthropic's agentic coding tool for the terminal, IDE and GitHub: it understands your codebase, executes routine tasks, explains code and handles git workflows from natural-language commands.
Orca★ 147kOpen-source desktop workspace that runs Claude Code, Codex, OpenCode and other CLI coding agents in parallel, each in its own git worktree, with a mobile companion app.
OpenAI Codex★ 137kOpenAI's cloud and CLI coding agent that writes features, fixes bugs, and proposes code changes across a repo, running tasks in parallel.
Pi★ 125kMinimal terminal coding agent harness with four built-in tools, extended through TypeScript extensions, skills and prompt templates instead of forks.
Gemini CLI★ 109kAn open-source command-line AI agent from Google that connects your terminal to Gemini models for reading code, editing files, running shell commands, and searching the web.
autoresearch★ 101kKarpathy's minimal harness that hands a coding agent a single-GPU LLM training script and lets it run fixed five-minute experiments, keeping or discarding each change on its own.
Janus★ 6.6kTerminal coding agent built on pi that sends every request to the strongest free model that is answering, and falls back to the next when one is rate-limited