cli-providers
它能做什么
这项技能展示如何通过命令行设置和检查 AI 提供商连接。适合连接模型提供商、并想确认连接可用的管理员。
适用场景
- ✓当用户想添加或列出一个 AI 提供商连接的时候。
- ✓当用户想测试某个提供商连接是否可用的时候。
- ✓当用户需要轮换某个提供商的 API 密钥的时候。
技能链接
https://github.com/cheaper-inference/OmniRoute/blob/release/v3.8.53/skills/cli-providers/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请测试我所有已启用的 AI 提供商连接,并告诉我哪些失败了。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能列出显示可用和已配置提供商、添加和测试连接、在不调用提供商的情况下验证本地设置、轮换密钥,以及查看每个提供商指标的命令。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Overview
Manage provider connections from the CLI: list available/configured providers, add, test, test-all, validate, rotate API keys, and view per-provider metrics.
Quick install
npm install -g omniroute # or: npx omniroute
omniroute --version
Subcommands
provider-cmd provider [subcommand]
Manage provider connections (use
Example:
omniroute provider-cmd provider [subcommand]
providers
Example:
omniroute providers
providers available
Show available providers in the OmniRoute catalog
Flags:
--json--search <query>-q, --q <query>--category <category>
Example:
omniroute providers available
providers list
List configured provider connections
Flags:
--json
Example:
omniroute providers list
providers test <idOrName>
Test a configured provider connection
Flags:
--json
Example:
omniroute providers test <idOrName>
providers test-all
Test all active provider connections
Flags:
--json
Example:
omniroute providers test-all
providers validate
Validate local provider configuration without calling upstream
Flags:
--json
Example:
omniroute providers validate
providers rotate <idOrName>
Flags:
--new-key <key>--from-env <VAR>--oauth--yes--skip-test--dry-run
Example:
omniroute providers rotate <idOrName>
providers status
Flags:
--provider <name>--json
Example:
omniroute providers status
providers metrics
Flags:
--provider <id>--connection-id <id>--period <p>--metric <m>--sort-by <field>--limit <n>--watch--compare <list>
Example:
omniroute providers metrics
providers metric <connectionId> <metric>
Flags:
--period <p>
Example:
omniroute providers metric <connectionId> <metric>
test-provider test [provider] [model]
Flags:
--all-providers--json--latency--repeat <n>--compare <models>--save <path>
Example:
omniroute test-provider test [provider] [model]
<!-- skill:custom-start -->
<!-- Migrated from skills/omniroute-cli-providers/SKILL.md (preserved curated content) -->
OmniRoute — CLI Providers & Keys
Requires the omniroute CLI. See CLI entry-point skill for install + global flags.
Provider catalog (available providers)
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
Categories: api-key, oauth, free, local, combo.
Configured provider connections
omniroute providers list # Connections in your DB
omniroute providers list --json
Testing connections
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 opens an interactive TUI that shows live pass/fail per connection. Use --json to get a machine-readable result:
omniroute providers test-all --json
API key management (OmniRoute keys)
These manage the OmniRoute API keys issued under API Manager — not provider credentials.
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
常见问题
验证会调用提供商吗?
不会。validate 命令只检查本地配置,不调用上游提供商。
我能一次测试所有连接吗?
可以。test-all 命令会测试所有已启用的连接。
我能查看提供商的指标吗?
可以。这项技能涵盖查看每个提供商指标的方法。
详情
作者的原始描述
Manage provider connections from the CLI: list available/configured providers, add, test, test-all, validate, rotate API keys, and view per-provider metrics.
热度
- GitHub 星标
- 84k
- 排名
- #1410
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …