@openmodex/cli
v0.1.2
Published
Command-line interface for the OpenModex API
Maintainers
Readme
OpenModex CLI
Command-line interface for the OpenModex API. Chat with any model, discover and compare models, manage configuration, and more — all from your terminal.
Installation
npm install -g @openmodex/cliQuick Start
# Set your API key
openmodex config set api_key omx_sk_...
# Start an interactive chat
openmodex chatCommands
chat
Interactive chat with streaming support.
# Interactive mode
openmodex chat
# One-shot mode
openmodex chat -m "What is the capital of France?"
# Specify model, system prompt, and temperature
openmodex chat --model claude-3.5-sonnet --system "You are a helpful assistant." --temperature 0.7models list
Display a table of available models.
openmodex models listmodels info <id>
Show details for a specific model.
openmodex models info openai/gpt-4omodels compare <model1> <model2>
Side-by-side model comparison with highlighted differences.
openmodex models compare openai/gpt-4o anthropic/claude-3.5-sonnetconfig set/get/list/reset
Manage CLI configuration.
openmodex config set api_key omx_sk_...
openmodex config get api_key
openmodex config list
openmodex config resetcompletions create
Create a text completion.
openmodex completions create -p "Once upon a time"embeddings create
Generate embeddings for text.
openmodex embeddings create -i "Hello world"api-keys list/create
Manage API keys.
openmodex api-keys list
openmodex api-keys createauth login/logout/status
Authentication management.
openmodex auth login
openmodex auth logout
openmodex auth statusGlobal Options
| Option | Description |
|--------|-------------|
| --api-key <key> | Override API key for this command |
| --base-url <url> | Override API base URL |
| --model <model> | Override default model |
| --output json\|table\|text | Output format (default: table) |
| --no-color | Disable colored output |
| --version | Show CLI version |
| --help | Show help for any command |
Configuration
Configuration is stored in ~/.openmodex/config.json. You can edit it directly or use the config commands.
{
"api_key": "omx_sk_...",
"base_url": "https://api.openmodex.com/v1",
"default_model": "gpt-4o",
"output_format": "table"
}Links
License
MIT
