A CLI for OpenRouter — the full API surface from the terminal. Chat, generate images/video/audio, embed text, transcribe speech, rerank documents, and discover models. Designed for both humans and AI agents.
git clone https://github.com/SonnyTaylor/or-cli.git
cd or-cli
bun install
bun install -g .# Set up API keys
or auth --or-key sk-or-v1-...
# Ask a question
or ask "Explain monads" -m deepseek/deepseek-v4-flash
# Generate an image
or create image "A mountain logo" --save logo.png
# Transcribe audio
or transcribe recording.mp3
# Find models
or models --tools --sort price -n 5| Command | Description |
|---|---|
or ask |
One-shot Q&A with multimodal inputs (image, audio, video, PDF) |
or chat |
Multi-turn conversations with persistent context |
| Command | Description |
|---|---|
or create image |
Image generation from text prompts |
or create video |
Video generation (async — submits, polls, downloads) |
or create audio |
Text-to-speech with voice selection |
| Command | Description |
|---|---|
or embed |
Text/multimodal embeddings |
or transcribe |
Speech-to-text transcription |
or rerank |
Document reranking by relevance |
| Command | Description |
|---|---|
or models |
Search, filter, and list 370+ models |
or show |
Detailed model info with price ranges |
or compare |
Side-by-side model comparison |
or benchmarks |
AA benchmark data (LLM, image, video, TTS) |
or rankings |
Daily token usage rankings |
or providers |
Provider datacenter info |
or endpoints |
Per-provider uptime, latency, pricing |
| Command | Description |
|---|---|
or auth |
API key management |
or config |
Default models, cache TTL, insecure mode |
or credits |
Account balance |
or cost |
Spending breakdown |
or history |
Chat history |
or conversations |
Conversation management |
or cache |
Cache stats and clear |
or doctor |
Connectivity diagnostics |
or version |
Version and environment info |
Every command supports:
--json— Machine-readable JSON output--quiet— Suppress non-essential output--no-cache— Bypass cache, fetch fresh data
Additional flags on or ask / or chat:
--no-stream— Wait for full response (default for non-TTY)--no-log— Don't save to history--exacto— Quality-first provider routing--server-cache— Free cached responses--heal— Auto-fix malformed JSON
npx skills add . -g -yInstalls a single consolidated or-cli skill with references for all commands.
- Runtime: Bun
- Language: TypeScript
- CLI Framework: Commander.js
- APIs: OpenRouter, Artificial Analysis
MIT