Terminal CLI (pleum)
Connect Claude Code, Aider, Codex and other coding agents to PleumRouter in one command.
Install#
Run without installing using npx pleumrouter (Node 18+). The pleum command used on this page is available after a global install: npm install -g pleumrouter.
# one-line installer (wraps a global npm install)
curl -fsSL https://router.pleum.ai/install | sh
# or with a package manager
npm install -g pleumrouter
bun install -g pleumrouter
# run without installing
npx pleumrouter --helpLogin#
A browser window opens automatically. After logging in, click "Approve & Connect" and an OAuth session is saved to ~/.pleum/config.json.
# browser login (default)
npx pleumrouter login
# no browser (SSH, CI)
npx pleumrouter login --deviceUse --device when you can't open a browser (SSH, CI). An 8-character code is shown; open router.pleum.ai/device on another device and enter it.
Launch an Agent#
The CLI sets per-agent env vars and config files automatically. Codex gets a temporary config for this run only and leaves ~/.codex alone, while Pi uses ~/.pleum/pi-home and Crush uses ~/.pleum/crush-home, so your own settings stay untouched.
# no arguments = launcher menu (arrow keys to move, enter to run, esc to quit)
pleum
# Claude Code
pleum launch claude --model claude-sonnet-5
# Aider
pleum launch aider --model gpt-5.5
# Codex (Responses API, provider applied for this run only)
pleum launch codex --model gpt-5.5
# Gemini CLI (native generateContent format)
pleum launch gemini --model gemini-3.8-flash
# Antigravity CLI (agy). alias: antigravity
pleum launch agy --model gemini-3.8-flash
# Pi (picode is a Pi package). alias: picode
pleum launch pi --model gpt-5.4-mini
# omp (Oh My Pi). alias: ohmypi
pleum launch omp --model claude-sonnet-5
# Crush
pleum launch crush
# Goose
pleum launch goose
# OpenHands
pleum launch openhands
# Codex (arguments after -- go to the tool)
pleum launch codex --model gpt-5.5 -- --sandbox workspace-writemodelProvider=gemini into ~/.gemini/antigravity-cli/settings.json because the product ignores GEMINI_API_KEY without that file, and restores your original values when it exits. --model accepts only verified Gemini models; any other model is rejected with an error. Aliases: antigravity maps to agy, picode maps to pi, ohmypi maps to omp. Kiro has no official BYOK, so it is not supported.Desktop wiring#
Apps left running in the Dock need a dedicated plm_ key, not the login JWT. pleum wire (or your first pleum launch) mints that key and stores it in ~/.pleum/wire.json, and the two share it. pleum launch writes its settings for that run only, while pleum wire merges them into user-level ~/.claude/settings.json and ~/.codex/config.toml. pleum logout does not delete the key. After wiring, running claude or codex yourself deducts PleumRouter credits instead of your existing subscription or key. Run pleum unwire to undo it.
# Desktop apps: merge a dedicated plm_ key into your ~/.claude and ~/.codex settings
pleum wire
pleum wire claude
pleum wire codex
# restore your settings (the key stays in ~/.pleum/wire.json)
pleum unwire
# restore and also revoke the key
pleum unwire --revoke-keyChat (REPL · one-shot · pipe)#
A multi-turn interactive REPL — but pass a prompt as an argument or pipe via stdin and it runs once, ready for scripts. Omit the model to get an interactive picker. Cost is shown in credits after each response.
# interactive REPL; replies render as streaming markdown (bold, code blocks, lists)
pleum run gpt-5.5
pleum run # no model: pick one with the arrow keys
# one-shot (scripts and pipes; piped output stays plain text)
pleum run gpt-5.5 "Summarize in one line: what is a transformer?"
cat error.log | pleum run gpt-5.5 "What caused this error?"
# inside the REPL: /help /model (arrow-key picker) /system /clear /save /load /exit
# Ctrl+C stops generation and keeps the conversation; wrap multi-line input in """; attach images with --attach or @pathInside the REPL, type /help for commands. /model <id> switches models without losing the conversation (compare models side by side); /system, /clear, /save, /load are also supported. Wrap multi-line input in """. Images are uploaded only with an explicit --attach (or @path) — a path written inside the message is not uploaded.
Model List#
Browse the public model catalog without authentication. Shows provider, context length, and price per 1M tokens; add --json for script-friendly output. --info opens a detail view with per-provider latency, throughput and uptime, and pleum top shows the router-wide usage leaderboard.
pleum models # full list (provider, context, price in credits per 1M tokens)
pleum models claude # only models that match "claude"
pleum models gpt --json # JSON output (for scripts and jq)
pleum models <id> --info # model detail: per-provider latency, throughput, uptime, weekly usage
pleum top # router-wide leaderboard and provider share (--period daily|weekly|monthly)Check Balance#
See your balance and spend right in the terminal. usage renders per-model/day spend as bar charts. If your session expired, or you get a 403 about a missing usage:read permission, run pleum login again.
pleum balance # Personal Credit: 12,500.0 credits / $9.4231
pleum usage --by model --days 7 # your spend report (bar chart) - model|provider|api_key|day
pleum health # check the public gateway and your login statusUtilities#
completion prints a shell completion script (tab-complete commands and model names). update (the same command as upgrade) installs the latest version via npm when a newer one exists and does nothing when you are already current. Add --force to reinstall anyway.
pleum version # print the version
pleum completion zsh # shell completion script
pleum update # install the latest version (--force reinstalls even if current)