CLI anyr
Chạy Claude Code, opencode hoặc Codex qua AnyRouter với một key và failover tự động.
Cài đặt · macOS và Linux
curl -fsSL https://anyrouter.dev/setup.sh | bashĐăng nhập và chạy
anyr login
anyr claudeCài anyr và ar vào ~/.local/bin. Không cần Node. Chưa hỗ trợ Windows.
Dùng coding agent của bạn qua AnyRouter
- Claude Code
anyr claude --model anyrouter/autoChạy Claude Code qua AnyRouter. anyrouter/auto chọn từ các model hàng đầu và tự failover.
- opencode
anyr opencode --model anyrouter/freeChạy opencode qua AnyRouter. anyrouter/free chỉ dùng model $0.
- Codex
anyr codex --model anyrouter/autoChạy Codex qua AnyRouter. Cùng key, cùng preset.
Cách hoạt động
- 01
Đăng nhập
anyr login mở trình duyệt. Qua SSH, nó chuyển sang device code.
- 02
Lưu key
CLI nhận một key và lưu cục bộ, mặc định trong keychain của hệ điều hành.
- 03
Chạy agent
anyr claude, opencode hoặc codex chạy agent thật, trỏ về AnyRouter.
Lần đầu? Chạy anyr login