Run Claude Code against OpenRouter for one session, without touching your Claude subscription login.
Hit your Pro or Max quota mid-task? Quit, run claudeor -c, and carry on with the same conversation on any of ~300 tool-capable models from ~40 vendors, paid per token through OpenRouter. Plain claude stays exactly as it was.
claudeor # default model on OpenRouter
claudeor -c # continue this directory's last session on OpenRouter
claudeor opus # short alias
claudeor qwen/qwen3-coder-next
claudeor --pick # fuzzy-search the live catalogue, then launch
claudeor --pick glm --by price
claudeor-models kimi # browse without launching
claudeor-vendors
curl -fsSL https://raw.githubusercontent.com/Steveybrown/claudeor/main/install.sh | shThen open a new shell and run claudeor-key to store your OpenRouter API key in Keychain (macOS) or libsecret (Linux). Without a keychain, export OPENROUTER_API_KEY=... in your profile works and always wins when set.
Requires zsh, jq, curl and git. fzf is optional but makes --pick far better. The installer clones to ~/.claudeor and adds one source line to ~/.zshrc; rerun it to update. To do that by hand:
git clone https://github.com/Steveybrown/claudeor ~/.claudeor
echo 'source ~/.claudeor/claudeor.zsh' >> ~/.zshrc| Command | What it does |
|---|---|
claudeor [model] [claude args] |
Launch Claude Code on OpenRouter. model is an alias or any OpenRouter id. Everything after it goes to claude, so -c, --resume <id>, -p "..." all work. |
claudeor --pick [query] [--by KEY] |
Choose from the live catalogue, then launch. fzf fuzzy search with a description preview when installed, otherwise a vendor-first numbered menu. |
claudeor --list |
Show the alias table. |
claudeor-models [query] [--by KEY] [--refresh] |
Print the catalogue: id, vendor, context, price per million tokens in and out, release date, think / vision flags. |
claudeor-vendors |
Vendors with model counts and newest release. |
claudeor-key |
Store or replace the OpenRouter key. |
KEY is date (default, newest first), price, ctx, vendor or name.
The catalogue is OpenRouter's public model list, filtered to models that support tool calling (Claude Code cannot work without it) and excluding batch endpoints. It is cached for a day.
Set these in your shell profile before the source line.
| Variable | Default | Purpose |
|---|---|---|
CLAUDEOR_DEFAULT |
sonnet |
Alias or id used when no model is given. |
CLAUDEOR_MODELS |
see file | zsh associative array of alias to id. Defaults use OpenRouter's rolling ~vendor/family-latest ids, so they track new releases. Define your own to replace the table. |
CLAUDEOR_SORT |
date |
Default sort for listings and the picker. |
CLAUDEOR_BIN |
~/.local/bin/claude, else claude on PATH |
Claude Code binary. |
CLAUDEOR_KEYCHAIN_SERVICE |
openrouter-api-key |
Keychain / libsecret entry name. |
CLAUDEOR_CACHE |
~/.cache/claudeor/models.v2.json |
Catalogue cache location. |
CLAUDEOR_CACHE_TTL |
86400 |
Cache lifetime in seconds. |
CLAUDEOR_SETTINGS |
~/.claude/settings.json |
Claude Code user settings, where the model default is restored. |
claudeor sets the OpenRouter gateway variables on one launched process only. Claude Code prefers a gateway token over the saved claude.ai login but leaves that login in place, so plain claude is untouched. No /logout, unlike OpenRouter's guide.
It also smooths over four Claude Code behaviours (v2.1.260):
- Maps
fable,opus,sonnetandhaikuto OpenRouter ids, so built-in aliases, plan mode and background calls keep working. - Passes the model's real context length, since unknown models are otherwise assumed to be 200k and compacted early.
- Restores your
modeldefault on exit, because/modelsaves its pick globally and would break plainclaude. - Turns Remote Control off for the session, because it fails on non-Anthropic hosts.
- No Remote Control on OpenRouter sessions. Use tmux if you need remote access.
/modellists a curated shortlist, not the catalogue. Use--pick, or type any id as/model <id>.- "isn't described by this version's model catalog" prints for non-Claude models. Ignore it.
/costshows nothing useful. Check the OpenRouter dashboard.- The exit hint
claude --resume <id>reopens on your subscription. Useclaudeor <model> --resume <id>. - "Supports tools" is the only filter. Weak models are still weak.
- zsh only.
Default aliases use OpenRouter's rolling ~vendor/family-latest ids. If one ever disappears, claudeor --list marks it and launching through it warns.
MIT
