Skip to content

openmodelsrun/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenModels CLI

CLI for the OpenModels — browse models, compare providers and check telemetry from terminal.

Installation

# Run without installing
npx @openmodels/cli

# Install globally
npm install -g @openmodels/cli

Requires Node.js ≥ 22.0.0.

Usage

# List all models
openmodels models list

# Filter by capability
openmodels models list --capability chat --sort context_window

# View model details
openmodels models info claude-opus-4-6

# Compare providers for a model
openmodels compare gpt-4o --sort price

# Search models
openmodels search "code generation" --limit 10

# List providers
openmodels providers list --search anthropic

# Check provider telemetry
openmodels telemetry anthropic --period 7d

Output Formats

All commands support --format to control output:

openmodels models list --format table   # Default, human-readable
openmodels models list --format json    # Machine-readable JSON
openmodels models list --format yaml    # YAML output

Configuration

Config File

Create ~/.openmodelsrc with default settings:

{
  "api_url": "https://api.openmodels.run",
  "api_key": "om_...",
  "format": "table",
  "no_color": false
}

Environment Variables

export OPENMODELS_API_URL=https://api.openmodels.run
export OPENMODELS_API_KEY=om_...

Precedence

CLI flags > Environment variables > Config file > Defaults

Global Options

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
-h, --help Show help
-V, --version Show version

Commands

Command Description
models list List models with optional filters
models info <id> Show detailed model information
providers list List inference providers
compare <model-id> Compare providers for a model
search <query> Search models by name or description
telemetry <provider-id> View provider health and latency
completions <shell> Generate shell completions

Shell Completions

# Bash
openmodels completions bash >> ~/.bashrc

# Zsh
openmodels completions zsh > ~/.zfunc/_openmodels

# Fish
openmodels completions fish > ~/.config/fish/completions/openmodels.fish

Development

# 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 lint

Documentation

Full documentation available at docs.openmodels.run.

License

MIT

About

CLI for the OpenModels – browse models, compare providers and check telemetry from terminal.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors