Command-line interface for the OpenModels registry — browse models, compare providers, and check telemetry from your terminal.
# Run without installing
npx @openmodels/cli
# Install globally
npm install -g @openmodels/cliRequires Node.js ≥ 22.0.0.
# List all models
openmodels models list
# Get details about a specific model
openmodels models info claude-opus-4-6
# Compare providers for a model
openmodels compare gpt-4o
# Search models
openmodels search "code generation"List models with optional filters.
openmodels models list
openmodels models list --capability chat
openmodels models list --modality text --sort context_window
openmodels models list --page 2 --limit 20| Option | Description |
|---|---|
--capability <cap> |
Filter by capability (e.g., chat, code, reasoning) |
--modality <mod> |
Filter by modality (e.g., text, image, audio) |
--sort <field> |
Sort by: name, recency, context_window, providers |
--page <n> |
Page number |
--limit <n> |
Results per page |
Display detailed information about a specific model including capabilities, modalities, context window, licensing, and provider availability with pricing.
openmodels models info claude-opus-4-6
openmodels models info gpt-4o --format jsonList inference providers.
openmodels providers list
openmodels providers list --search anthropic
openmodels providers list --page 1 --limit 10| Option | Description |
|---|---|
--search <term> |
Filter providers by search term |
--page <n> |
Page number |
--limit <n> |
Results per page |
Compare all providers offering a specific model side-by-side, showing pricing, rate limits, and regions.
openmodels compare gpt-4o
openmodels compare claude-opus-4-6 --sort rate_limit
openmodels compare deepseek-r1 --format yaml| Option | Description |
|---|---|
--sort <field> |
Sort by: price (default), rate_limit |
Full-text search across models by name or description.
openmodels search "code generation"
openmodels search "vision" --capability chat --limit 5| Option | Description |
|---|---|
--capability <cap> |
Additionally filter by capability |
--limit <n> |
Maximum number of results |
View provider health status and latency metrics.
openmodels telemetry anthropic
openmodels telemetry together-ai --period 7d
openmodels telemetry openai --format json| Option | Description |
|---|---|
--period <period> |
Time period: 1d, 7d, 30d |
Output includes current status (up/down), uptime percentage, average time-to-first-token, average total response time, and p95 percentiles.
Generate shell completion scripts.
# Bash
openmodels completions bash >> ~/.bashrc
# Zsh
openmodels completions zsh > ~/.zfunc/_openmodels
# Fish
openmodels completions fish > ~/.config/fish/completions/openmodels.fishAll commands support the --format flag to control output:
openmodels models list --format table # Default — human-readable aligned columns
openmodels models list --format json # Machine-readable JSON
openmodels models list --format yaml # YAML outputTable format uses colored headers and status indicators for interactive use. JSON and YAML formats are designed for piping to other tools and CI/CD pipelines.
Create ~/.openmodelsrc to store default settings:
{
"api_url": "https://api.openmodels.run",
"api_key": "om_...",
"format": "table",
"no_color": false
}All fields are optional. If the file contains invalid JSON, the CLI prints a warning and continues with defaults.
| Variable | Description |
|---|---|
OPENMODELS_API_URL |
API base URL (default: https://api.openmodels.run) |
OPENMODELS_API_KEY |
API authentication key |
NO_COLOR |
Disable colored output (any value) |
Configuration is resolved with the following priority (highest to lowest):
- CLI flags (
--api-url,--api-key,--format,--no-color) - Environment variables (
OPENMODELS_API_URL,OPENMODELS_API_KEY) - Config file (
~/.openmodelsrc) - Defaults (
api_url: https://api.openmodels.run,format: table)
| Flag | Description |
|---|---|
--format <type> |
Output format: table, json, yaml |
--api-url <url> |
API base URL |
--api-key <key> |
API authentication key |
--no-color |
Disable colored output |
--verbose |
Show detailed error information including stack traces |
-h, --help |
Show help |
-V, --version |
Show version |
The CLI provides clear, actionable error messages:
- Resource not found — when a model or provider ID doesn't exist
- Rate limited — suggests waiting before retrying
- Network errors — suggests checking connectivity
- Unexpected errors — use
--verbosefor full details
All errors are written to stderr so piped output remains clean. The CLI exits with code 0 on success and non-zero on failure.
cd cli
# Install dependencies
npm install
# Build
npm run build
# Run in development (watch mode)
npm run dev
# Run tests
npm test
# Type check
npm run type-check
# Lint
npm run lintMIT