CLI Reference
UnifyRoute command-line interface documentation
Table of Contents
Overview
UnifyRoute provides a comprehensive CLI for managing the gateway, providers, tokens, and configuration.
Usage: ./unifyroute [COMMAND] [OPTIONS]
Global Options
| |
Setup & Services
setup
Initialize UnifyRoute with interactive configuration wizard.
| |
Options:
--skip-wizard- Skip interactive prompts and use defaults--force- Overwrite existing configuration
Example:
| |
start
Start all UnifyRoute services.
| |
Options:
--port- HTTP port (default: 6565)--host- Bind host (default: localhost)--foreground- Run in foreground (don’t daemonize)--workers- Number of API workers (default: 4)
Example:
| |
stop
Stop all running UnifyRoute services.
| |
Options:
--timeout- Timeout for graceful shutdown (default: 30s)
restart
Restart all services.
| |
status
Check status of all services.
| |
Output:
API Gateway: running (PID: 1234)
Router: running (PID: 1235)
Quota Poller: running (PID: 1236)
Dashboard: running (PID: 1237)
Token Management
tokens list
List all API tokens.
| |
Options:
--format- Output format (json, table, default: table)--active-only- Show only active tokens--user- Filter by user
Example:
| |
tokens create
Create a new API token.
| |
Options:
--name- Token name (required)--user- User ID--permissions- Comma-separated permissions--expires-in- Expiration duration (e.g., 30d, 1y)--quota- Token quota (requests/month)--rate-limit- Rate limit (requests/minute)
Example:
| |
tokens revoke
Revoke an API token.
| |
Example:
| |
tokens info
Show detailed token information.
| |
Provider Management
providers list
List configured providers.
| |
Options:
--format- Output format (json, table)--with-credentials- Include credentials (masked)
Example:
| |
providers add
Add a new provider.
| |
Options:
--name- Provider name (required)--type- Provider type: openai, anthropic, together (required)--api-key- API key--api-base- API base URL
Example:
| |
providers remove
Remove a provider.
| |
providers test
Test provider connectivity.
| |
Output:
Testing provider 'openai'...
✓ Authentication successful
✓ Models endpoint responding
✓ Chat completions test request OK
✓ Model list: 5 models available
Configuration
config show
Display current configuration.
| |
Options:
--format- Output format (yaml, json)--section- Show specific section only
Example:
| |
config edit
Edit configuration interactively.
| |
Example:
| |
config validate
Validate configuration syntax.
| |
Monitoring & Diagnostics
health
Check system health.
| |
Options:
--check- Specific health check (database, redis, providers)
Example:
| |
logs
View service logs.
| |
Options:
--service- Service name (api, router, dashboard)--since- View logs since (e.g., 1h, 30m)--follow, -f- Follow logs in real-time--lines- Number of lines to show
Example:
| |
stats
Show usage statistics.
| |
Options:
--period- Time period (today, week, month)--by- Group by (provider, token, model)--format- Output format (table, json)
Example:
| |
Maintenance
backup
Create a backup of configuration and data.
| |
restore
Restore from backup.
| |
migration
Database migration commands.
| |
Help & Documentation
help
Show help for any command.
| |
Example:
| |
Examples
Complete Setup Workflow
| |
Monitoring Workflow
| |