cli-providers
Manage provider connections from the CLI: list available/configured providers, add, test, test-all, validate, rotate API keys, and view per-provider metrics.
SKILL.mdskills/cli-providers/SKILL.md
GitHub<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
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 nextroute # or: npx nextroute
nextroute --version
Subcommands
provider-cmd provider [subcommand]
Manage provider connections (use
Example:
nextroute provider-cmd provider [subcommand]
providers
Example:
nextroute providers
providers available
Show available providers in the NextRoute catalog
Flags:
--json--search <query>-q, --q <query>--category <category>
Example:
nextroute providers available
providers list
List configured provider connections
Flags:
--json
Example:
nextroute providers list
providers test <idOrName>
Test a configured provider connection
Flags:
--json
Example:
nextroute providers test <idOrName>
providers test-all
Test all active provider connections
Flags:
--json
Example:
nextroute providers test-all
providers validate
Validate local provider configuration without calling upstream
Flags:
--json
Example:
nextroute providers validate
providers rotate <idOrName>
Flags:
--new-key <key>--from-env <VAR>--oauth--yes--skip-test--dry-run
Example:
nextroute providers rotate <idOrName>
providers status
Flags:
--provider <name>--json
Example:
nextroute providers status
providers metrics
Flags:
--provider <id>--connection-id <id>--period <p>--metric <m>--sort-by <field>--limit <n>--watch--compare <list>
Example:
nextroute providers metrics
providers metric <connectionId> <metric>
Flags:
--period <p>
Example:
nextroute providers metric <connectionId> <metric>
test-provider test [provider] [model]
Flags:
--all-providers--json--latency--repeat <n>--compare <models>--save <path>
Example:
nextroute test-provider test [provider] [model]
<!-- skill:custom-start -->
<!-- Migrated from skills/nextroute-cli-providers/SKILL.md (preserved curated content) -->
NextRoute — CLI Providers & Keys
Requires the nextroute CLI. See CLI entry-point skill for install + global flags.
Provider catalog (available providers)
nextroute providers available # Full NextRoute provider catalog
nextroute providers available --search openai # Filter by id, name, alias
nextroute providers available --category api-key # Filter by category
nextroute providers available --json # Machine-readable JSON
Categories: api-key, oauth, free, local, combo.
Configured provider connections
nextroute providers list # Connections in your DB
nextroute providers list --json
Testing connections
nextroute providers test <id|name> # Test one configured connection
nextroute providers test-all # Test every active connection (TUI progress)
nextroute 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:
nextroute providers test-all --json
API key management (NextRoute keys)
These manage the NextRoute API keys issued under API Manager — not provider credentials.
nextroute keys list # List all NextRoute API keys
nextroute keys add <provider> [apiKey] # Add an API key for a provider
nextroute keys remove <provider> # Remove an API key
nextroute keys regenerate <id> # Regenerate (rotate) a key
nextroute keys revoke <id> # Revoke a key (disables it)
nextroute keys reveal <id> # Show the full key value
nextroute keys usage <id> # Show usage stats for a key
nextroute keys rotate <id> # Rotate + revoke old key atomically
nextroute keys expiration list # List key expiration times
Key policies
nextroute keys policy show <id> # Show rate-limit / permission policy
nextroute keys policy set <id> \
--rate-limit 100 \
--rate-window minute \
--permissions chat,models # Set policy on a key
Models
nextroute models # List all models (all providers)
nextroute models openai # Filter by provider
nextroute models --search gpt # Search by name
nextroute models --json # JSON output
OAuth providers
nextroute oauth list # List OAuth-configured providers
nextroute oauth login <provider> # Start browser-based OAuth flow
nextroute oauth logout <provider> # Revoke OAuth token
nextroute oauth status <provider> # Show token state + expiry
nextroute oauth refresh <provider> # Force token refresh
For OAuth providers (Gemini, Windsurf, Antigravity, etc.) the login command opens the NextRoute dashboard OAuth flow in your browser.
Provider nodes (multi-account routing)
Provider nodes let you attach multiple API keys / accounts to one logical provider for round-robin or failover.
nextroute nodes list <provider> # List nodes for a provider
nextroute nodes add <provider> --api-key <key> # Add a node
nextroute nodes remove <provider> <nodeId> # Remove a node
nextroute nodes test <provider> <nodeId> # Test one node
Routing combos (CLI)
Create and manage routing combos from the terminal:
nextroute combo list # List all combos
nextroute combo create <name> \
--strategy priority \
--targets anthropic/claude-opus-4-7,openai/gpt-4o # Create combo
nextroute combo switch <name> # Activate a combo as default
nextroute combo delete <name> # Delete a combo
nextroute combo suggest --task "code review" # Ask NextRoute to recommend a combo
For the full REST API for combos see nextroute-routing skill.
Quota & usage
nextroute quota # Provider quota usage + reset times
nextroute usage # Request + token usage summary
nextroute cost # Cost breakdown (by provider/model)
Compression (CLI)
nextroute compression status # Current compression mode + savings stats
nextroute compression set --mode rtk # Enable RTK compression
nextroute compression set --mode stacked # Enable stacked (RTK + Caveman)
nextroute compression set --mode off # Disable compression
nextroute compression preview --mode rtk --text "..." # Preview savings for sample text
Health
nextroute health # Detailed health: circuit breakers, cache, memory
Errors
providers test <id>fails with 401 → API key stored for that provider is wrong; usekeys remove+keys addto reset itoauth loginopens but doesn't complete → the OAuth token endpoint may be firewalled; use API key auth insteadcombo createfails withstrategy unknown→ use one of:priority,weighted,round-robin,fill-first,least-used,cost-optimized,auto,random,strict-random,p2c,reset-aware,lkgp,context-optimized,context-relay<!-- skill:custom-end -->