openrouter-cli-v2
v1.3.0
Published
The AI coding CLI powered by OpenRouter.
Maintainers
Readme
openrouter-cli
The AI coding CLI powered by OpenRouter.
openrouter-cli is a professional terminal coding agent for real codebases. It can chat about a project, build smart local context, stream OpenRouter responses, continue after tool calls, propose structured file edits, show diffs before writing, and protect untrusted workspaces with a project trust system.
Highlights
- Interactive terminal chat with
orc - Slash command autocomplete in interactive chat
- File and folder mentions with
@pathautocomplete - Trust Project, Trust Folder, and Restricted workspace security
- First-run setup UI with API key verification and live model selection
- Single-shot questions with
orc ask - Approved AI editing workflow with professional diffs and optional auto mode
- Live OpenRouter model discovery with global cache and offline fallback
- Plugin architecture with local plugin loading, lifecycle hooks, and slash commands
- MCP server configuration, connection checks, and dynamic tool discovery
- Local provider architecture for Ollama, LM Studio, llama.cpp, and OpenAI-compatible APIs
- VS Code extension MVP powered by the
orcbackend - OS app-data storage for global state and project-local
.openrouter-cli/state - Safety protections for commands, files, secrets, credentials, plugins, and MCP
- Git-aware commit message generation
Install
npm install -g openrouter-cli-v2@latestQuickstart
orc
orc ask "explain this project"
orc ask "explain @src/index.ts"
orc edit "fix TypeScript errors"
orc models --freeOn first run, orc starts a guided setup that stores the OpenRouter API key globally, verifies the key, downloads live models, creates .openrouter-cli/project-config.json, and asks whether to trust the current project. A project .env can still override the global key.
In interactive mode, type / for slash commands or @ to mention files and folders.
Commands
orc
orc setup
orc ask "explain this project"
orc edit "add jwt authentication"
orc edit "fix tests" --yes
orc explain
orc context
orc models --search claude
orc providers
orc provider setup
orc trust
orc trust list
orc plugins
orc plugin install ./my-plugin
orc mcp add filesystem npx @modelcontextprotocol/server-filesystem ./
orc mcp connect filesystem
orc voice
orc agents
orc workflow "build auth system"
orc dashboard
orc doctor
orc commitInteractive Features
/help,/models,/context,/files,/trust,/doctor,/plugins,/mcp,/exit@src/index.tsinjects a file into AI context@src/commandsinjects matching text files from a folderorc edit "fix bugs" --yesenables auto edits and commands for trusted projects onlyorc edit "fix bugs" --auto-editsorc edit "run tests" --auto-cmds
Storage
Global state is stored in the OS app-data directory:
- Windows:
%APPDATA%\openrouter-cli - Linux:
$XDG_CONFIG_HOME/openrouter-clior~/.config/openrouter-cli - macOS:
~/Library/Application Support/openrouter-cli
Project state stays under .openrouter-cli/.
Documentation
Start with the documentation hub:
- Documentation Index
- Getting Started
- Configuration
- Architecture
- Plugin Development
- MCP Support
- Development Guide
Roadmap
- [x] First-run setup UI
- [x] Live OpenRouter model discovery
- [x] Approved AI file editing workflow
- [x] Plugin system MVP
- [x] MCP support MVP
- [x] Local providers architecture MVP
- [x] Plugin marketplace registry MVP
- [x] Voice mode architecture MVP
- [x] Multi-agent workflows architecture MVP
- [x] VS Code extension MVP
- [x] Web dashboard shell MVP
- [x] Team collaboration architecture planning
- [x] Agent tool loop continuation after tool calls
- [x] Auto accept edits and commands
- [x] Slash command autocomplete
- [x] File mention autocomplete
- [x] Trust project/folder security
- [x] OS app-data storage
- [ ] Full plugin marketplace hosting
- [ ] Full voice streaming implementation
- [ ] Production web dashboard app
- [ ] Team collaboration SaaS
Contributing
See CONTRIBUTING.md.
License
MIT
