cli-providers
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
<!-- 由 src/lib/agentSkills/generator.ts 生成;手动修改将被覆盖 -->
Overview
概览
Manage provider connections from the CLI: list available/configured providers, add, test, test-all, validate, rotate API keys, and view per-provider metrics.
通过 CLI 管理提供商连接:列出可用或已配置的提供商,添加、测试、批量测试、验证、轮换 API keys,以及查看各提供商的指标。
Quick install
快速安装
bash
npm install -g omniroute # or: npx omniroute
omniroute --versionbash
npm install -g omniroute # or: npx omniroute
omniroute --versionSubcommands
子命令
provider-cmd provider [subcommand]
provider-cmd provider [subcommand]provider-cmd provider [subcommand]
provider-cmd provider [subcommand]Manage provider connections (use
Example:
bash
omniroute provider-cmd provider [subcommand]管理提供商连接(使用
示例:
bash
omniroute provider-cmd provider [subcommand]providers
providersproviders
providersExample:
bash
omniroute providers示例:
bash
omniroute providersproviders available
providers availableproviders available
providers availableShow available providers in the OmniRoute catalog
Flags:
--json--search <query>-q, --q <query>--category <category>
Example:
bash
omniroute providers available显示 OmniRoute 目录中可用的提供商
参数:
--json--search <query>-q, --q <query>--category <category>
示例:
bash
omniroute providers availableproviders list
providers listproviders list
providers listList configured provider connections
Flags:
--json
Example:
bash
omniroute providers list列出已配置的提供商连接
参数:
--json
示例:
bash
omniroute providers listproviders test <idOrName>
providers test <idOrName>providers test <idOrName>
providers test <idOrName>Test a configured provider connection
Flags:
--json
Example:
bash
omniroute providers test <idOrName>测试已配置的提供商连接
参数:
--json
示例:
bash
omniroute providers test <idOrName>providers test-all
providers test-allproviders test-all
providers test-allTest all active provider connections
Flags:
--json
Example:
bash
omniroute providers test-all测试所有活跃的提供商连接
参数:
--json
示例:
bash
omniroute providers test-allproviders validate
providers validateproviders validate
providers validateValidate local provider configuration without calling upstream
Flags:
--json
Example:
bash
omniroute providers validate在不调用上游服务的情况下验证本地提供商配置
参数:
--json
示例:
bash
omniroute providers validateproviders rotate <idOrName>
providers rotate <idOrName>providers rotate <idOrName>
providers rotate <idOrName>Flags:
--new-key <key>--from-env <VAR>--oauth--yes--skip-test--dry-run
Example:
bash
omniroute providers rotate <idOrName>参数:
--new-key <key>--from-env <VAR>--oauth--yes--skip-test--dry-run
示例:
bash
omniroute providers rotate <idOrName>providers status
providers statusproviders status
providers statusFlags:
--provider <name>--json
Example:
bash
omniroute providers status参数:
--provider <name>--json
示例:
bash
omniroute providers statusproviders metrics
providers metricsproviders metrics
providers metricsFlags:
--provider <id>--connection-id <id>--period <p>--metric <m>--sort-by <field>--limit <n>--watch--compare <list>
Example:
bash
omniroute providers metrics参数:
--provider <id>--connection-id <id>--period <p>--metric <m>--sort-by <field>--limit <n>--watch--compare <list>
示例:
bash
omniroute providers metricsproviders metric <connectionId> <metric>
providers metric <connectionId> <metric>providers metric <connectionId> <metric>
providers metric <connectionId> <metric>Flags:
--period <p>
Example:
bash
omniroute providers metric <connectionId> <metric>参数:
--period <p>
示例:
bash
omniroute providers metric <connectionId> <metric>test-provider test [provider] [model]
test-provider test [provider] [model]test-provider test [provider] [model]
test-provider test [provider] [model]Flags:
--all-providers--json--latency--repeat <n>--compare <models>--save <path>
Example:
bash
omniroute test-provider test [provider] [model]参数:
--all-providers--json--latency--repeat <n>--compare <models>--save <path>
示例:
bash
omniroute test-provider test [provider] [model]OmniRoute — CLI Providers & Keys
OmniRoute — CLI 提供商与 API keys
Requires the CLI. See CLI entry-point skill for install + global flags.
omniroute需要 CLI。有关安装和全局参数,请参阅 CLI 入口 skill。
omnirouteProvider catalog (available providers)
提供商目录(可用提供商)
bash
omniroute providers available # Full OmniRoute provider catalog
omniroute providers available --search openai # Filter by id, name, alias
omniroute providers available --category api-key # Filter by category
omniroute providers available --json # Machine-readable JSONCategories: , , , , .
api-keyoauthfreelocalcombobash
omniroute providers available # Full OmniRoute provider catalog
omniroute providers available --search openai # Filter by id, name, alias
omniroute providers available --category api-key # Filter by category
omniroute providers available --json # Machine-readable JSON类别:、、、、。
api-keyoauthfreelocalcomboConfigured provider connections
已配置的提供商连接
bash
omniroute providers list # Connections in your DB
omniroute providers list --jsonbash
omniroute providers list # Connections in your DB
omniroute providers list --jsonTesting connections
测试连接
bash
omniroute providers test <id|name> # Test one configured connection
omniroute providers test-all # Test every active connection (TUI progress)
omniroute providers validate # Local-only structural validation (no HTTP)test-all--jsonbash
omniroute providers test-all --jsonbash
omniroute providers test <id|name> # Test one configured connection
omniroute providers test-all # Test every active connection (TUI progress)
omniroute providers validate # Local-only structural validation (no HTTP)test-all--jsonbash
omniroute providers test-all --jsonAPI key management (OmniRoute keys)
API key 管理(OmniRoute keys)
These manage the OmniRoute API keys issued under API Manager — not provider credentials.
bash
omniroute keys list # List all OmniRoute API keys
omniroute keys add <provider> [apiKey] # Add an API key for a provider
omniroute keys remove <provider> # Remove an API key
omniroute keys regenerate <id> # Regenerate (rotate) a key
omniroute keys revoke <id> # Revoke a key (disables it)
omniroute keys reveal <id> # Show the full key value
omniroute keys usage <id> # Show usage stats for a key
omniroute keys rotate <id> # Rotate + revoke old key atomically
omniroute keys expiration list # List key expiration times这些命令管理由 API Manager 签发的 OmniRoute API keys,而不是提供商凭据。
bash
omniroute keys list # List all OmniRoute API keys
omniroute keys add <provider> [apiKey] # Add an API key for a provider
omniroute keys remove <provider> # Remove an API key
omniroute keys regenerate <id> # Regenerate (rotate) a key
omniroute keys revoke <id> # Revoke a key (disables it)
omniroute keys reveal <id> # Show the full key value
omniroute keys usage <id> # Show usage stats for a key
omniroute keys rotate <id> # Rotate + revoke old key atomically
omniroute keys expiration list # List key expiration timesKey policies
Key 策略
bash
omniroute keys policy show <id> # Show rate-limit / permission policy
omniroute keys policy set <id> \
--rate-limit 100 \
--rate-window minute \
--permissions chat,models # Set policy on a keybash
omniroute keys policy show <id> # Show rate-limit / permission policy
omniroute keys policy set <id> \
--rate-limit 100 \
--rate-window minute \
--permissions chat,models # Set policy on a keyModels
模型
bash
omniroute models # List all models (all providers)
omniroute models openai # Filter by provider
omniroute models --search gpt # Search by name
omniroute models --json # JSON outputbash
omniroute models # List all models (all providers)
omniroute models openai # Filter by provider
omniroute models --search gpt # Search by name
omniroute models --json # JSON outputOAuth providers
OAuth 提供商
bash
omniroute oauth list # List OAuth-configured providers
omniroute oauth login <provider> # Start browser-based OAuth flow
omniroute oauth logout <provider> # Revoke OAuth token
omniroute oauth status <provider> # Show token state + expiry
omniroute oauth refresh <provider> # Force token refreshFor OAuth providers (Gemini, Windsurf, Antigravity, etc.) the command opens the OmniRoute dashboard OAuth flow in your browser.
loginbash
omniroute oauth list # List OAuth-configured providers
omniroute oauth login <provider> # Start browser-based OAuth flow
omniroute oauth logout <provider> # Revoke OAuth token
omniroute oauth status <provider> # Show token state + expiry
omniroute oauth refresh <provider> # Force token refresh对于 OAuth 提供商(Gemini、Windsurf、Antigravity 等), 命令会在浏览器中打开 OmniRoute dashboard 的 OAuth 流程。
loginProvider nodes (multi-account routing)
提供商节点(多账户路由)
Provider nodes let you attach multiple API keys / accounts to one logical provider for round-robin or failover.
bash
omniroute nodes list <provider> # List nodes for a provider
omniroute nodes add <provider> --api-key <key> # Add a node
omniroute nodes remove <provider> <nodeId> # Remove a node
omniroute nodes test <provider> <nodeId> # Test one node提供商节点允许将多个 API keys 或账户附加到一个逻辑提供商,以实现 round-robin 或故障转移。
bash
omniroute nodes list <provider> # List nodes for a provider
omniroute nodes add <provider> --api-key <key> # Add a node
omniroute nodes remove <provider> <nodeId> # Remove a node
omniroute nodes test <provider> <nodeId> # Test one nodeRouting combos (CLI)
路由组合(CLI)
Create and manage routing combos from the terminal:
bash
omniroute combo list # List all combos
omniroute combo create <name> \
--strategy priority \
--targets anthropic/claude-opus-4-7,openai/gpt-4o # Create combo
omniroute combo switch <name> # Activate a combo as default
omniroute combo delete <name> # Delete a combo
omniroute combo suggest --task "code review" # Ask OmniRoute to recommend a comboFor the full REST API for combos see omni-combos-routing skill.
从终端创建和管理路由组合:
bash
omniroute combo list # List all combos
omniroute combo create <name> \
--strategy priority \
--targets anthropic/claude-opus-4-7,openai/gpt-4o # Create combo
omniroute combo switch <name> # Activate a combo as default
omniroute combo delete <name> # Delete a combo
omniroute combo suggest --task "code review" # Ask OmniRoute to recommend a combo有关路由组合的完整 REST API,请参阅 omni-combos-routing skill。
Quota & usage
配额与用量
bash
omniroute quota # Provider quota usage + reset times
omniroute usage # Request + token usage summary
omniroute cost # Cost breakdown (by provider/model)bash
omniroute quota # Provider quota usage + reset times
omniroute usage # Request + token usage summary
omniroute cost # Cost breakdown (by provider/model)Compression (CLI)
压缩(CLI)
bash
omniroute compression status # Current compression mode + savings stats
omniroute compression set --mode rtk # Enable RTK compression
omniroute compression set --mode stacked # Enable stacked (RTK + Caveman)
omniroute compression set --mode off # Disable compression
omniroute compression preview --mode rtk --text "..." # Preview savings for sample textbash
omniroute compression status # Current compression mode + savings stats
omniroute compression set --mode rtk # Enable RTK compression
omniroute compression set --mode stacked # Enable stacked (RTK + Caveman)
omniroute compression set --mode off # Disable compression
omniroute compression preview --mode rtk --text "..." # Preview savings for sample textHealth
健康状态
bash
omniroute health # Detailed health: circuit breakers, cache, memorybash
omniroute health # Detailed health: circuit breakers, cache, memoryErrors
错误
- fails with 401 → API key stored for that provider is wrong; use
providers test <id>+keys removeto reset itkeys add - opens but doesn't complete → the OAuth token endpoint may be firewalled; use API key auth instead
oauth login - fails with
combo create→ use one of:strategy unknown,priority,weighted,round-robin,fill-first,least-used,cost-optimized,auto,random,strict-random,p2c,reset-aware,lkgp,context-optimizedcontext-relay
- 返回 401 失败 → 为该提供商存储的 API key 不正确;使用
providers test <id>+keys remove重置keys add - 已打开但未完成 → OAuth token endpoint 可能被防火墙拦截;改用 API key 认证
oauth login - 因
combo create失败 → 使用以下策略之一:strategy unknown、priority、weighted、round-robin、fill-first、least-used、cost-optimized、auto、random、strict-random、p2c、reset-aware、lkgp、context-optimizedcontext-relay