The anyr CLICLI anyranyr 命令行
Launch Claude Code, opencode or Codex through AnyRouter with one key and automatic failover.Chạy Claude Code, opencode hoặc Codex qua AnyRouter với một key và failover tự động.用一把 Key 通过 AnyRouter 启动 Claude Code、opencode 或 Codex,自动故障转移。
curl -fsSL https://anyrouter.dev/setup.sh | bashanyr login
anyr claudeInstalls anyr and ar into ~/.local/bin. No Node required. Windows is not supported yet.Cài anyr và ar vào ~/.local/bin. Không cần Node. Chưa hỗ trợ Windows.把 anyr 和 ar 装到 ~/.local/bin,不需要 Node。暂不支持 Windows。
Use your coding agent through AnyRouterDùng coding agent của bạn qua AnyRouter让你的 coding agent 走 AnyRouter
- Claude Code
anyr claude --model anyrouter/autoLaunch Claude Code routed through AnyRouter. anyrouter/auto picks from top models and fails over.Chạy Claude Code qua AnyRouter. anyrouter/auto chọn từ các model hàng đầu và tự failover.通过 AnyRouter 启动 Claude Code。anyrouter/auto 从热门模型中选择并自动故障转移。
- opencode
anyr opencode --model anyrouter/freeLaunch opencode routed through AnyRouter. anyrouter/free stays on $0 models.Chạy opencode qua AnyRouter. anyrouter/free chỉ dùng model $0.通过 AnyRouter 启动 opencode。anyrouter/free 只用 $0 模型。
- Codex
anyr codex --model anyrouter/autoLaunch Codex routed through AnyRouter. Same key, same presets.Chạy Codex qua AnyRouter. Cùng key, cùng preset.通过 AnyRouter 启动 Codex。同一把 Key,同样的预设。
How it worksCách hoạt động工作方式
- 01
Log inĐăng nhập登录
anyr login opens your browser. Over SSH it switches to a device code.anyr login mở trình duyệt. Qua SSH, nó chuyển sang device code.anyr login 会打开浏览器;SSH 下自动改用 device code。
- 02
Key savedLưu key保存 Key
The CLI gets a key and stores it locally, in the OS keychain by default.CLI nhận một key và lưu cục bộ, mặc định trong keychain của hệ điều hành.CLI 拿到 Key 并存在本地,默认放进系统钥匙串。
- 03
Agent launchedChạy agent启动 agent
anyr claude, anyr opencode or anyr codex starts the real agent pointed at AnyRouter.anyr claude, opencode hoặc codex chạy agent thật, trỏ về AnyRouter.anyr claude、opencode 或 codex 会启动真正的 agent,并指向 AnyRouter。
First time? RunLần đầu? Chạy第一次用?运行 anyr login