一个 CLI,多个账号
工作号和私人号。客户的网关和你自己的。CLI 现在把账号当一等公民:
anyr account add work # sign in to a second account
anyr account use work # switch the default
anyr whoami # who am I right now?
ANYROUTER_PROFILE=ci anyr claude # pin an account per shell or CI job每个账号在 ~/.anyrouter/config.yaml 里各自保存 key、base URL 和默认值。一条命令用 --profile 覆盖,一个 shell 用 ANYROUTER_PROFILE,account use 则持久切换。anyr whoami 总会告诉你当前是哪个账号、key 在哪——已打码,从不打印密钥。
anyr logout 现在清掉登录写入的一切——系统钥匙串和配置文件——但保留该账号的设置,再登只需一步。
不用离开终端也能管 API key
浏览器登录现在还会存一份有范围的管理凭证,所以 key 管理就在你站着的地方:
anyr keys list # * marks the key in use
anyr keys create laptop # minted and offered for storage in one step
anyr keys use # pick a key, switch to it
anyr keys revoke <hash> # gone (asks first)管理凭证只能列出、创建和吊销 key——别的不行。它不能跑推理,任何命令都不会打印它,anyr logout 会删掉它。dashboard 的 keys 页仍然只差一条裸的 anyr keys。
用强模型做计划,用快模型落地
anyr task 跑两阶段流水线:规划模型写出编号计划,实现模型严格按该计划执行。两阶段都流式输出,结束时打印 token 摘要。
anyr task "refactor this CSV parser to stream" \
--plan-model openai/gpt-5.2 \
--do-model z-ai/glm-4.7-flash把贵的规划器和便宜的实现器配对,能用一小部分成本拿到大部分质量——--json 让整条流水线可脚本化。
Agent 互相委派
因为一把 key 驱动每个 coding agent,agent 现在可以把活交给彼此:
anyr delegate --to codex "add unit tests for src/utils/slug.ts"
anyr delegate --to claude "explain this stack trace" --model deepseek/deepseek-v3目标 agent 无头运行(claude -p、codex exec、opencode run),经网关用你存好的 key,流式输出,并以自己的退出码退出。已经走 AnyRouter 的 agent 会话以 delegate_task 工具调用拿到同一能力,桥接到 CLI——被委派 agent 的输出回到对话里。
护栏内置:委派上限是 **一跳**——被委派的 agent 不能再委派——所以两个 agent 不能互相打乒乓球(也花不掉双倍)。终端运行会先确认再花钱;脚本用 --yes 选择加入。
试试看
以上都已随当前 anyr CLI 发布——不用新安装、不用迁移,你已经在用的每条命令行为不变。
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr auth login相关文章
Run coding agents through one gateway
Point Claude Code, Codex, OpenCode, Cursor, or any OpenAI-compatible tool at AnyRouter and get one key for every model, unified billing, per-request audit logs, and app attribution. Two environment variables — or one npx command with the anyr CLI launcher.
Run Claude Code on AnyRouter — wrapper script or CLI
Route Claude Code through AnyRouter in two ways: a wrapper that installs itself and maps Opus, Sonnet, and Haiku to one catalog model (override with --model), or the anyr CLI launcher. One key, unified billing, audit logs.
Sign in with AnyRouter: let users bring their own LLM account
If your app needs an LLM API to run, you have two bad options: ship your own keys and eat every user's inference bill, or make each user paste in a raw provider key. "Sign in with AnyRouter" is the third option — users sign in with their AnyRouter account, and their own balance powers the inference. You get a temporary, inference-only key per user and never handle model billing.