Jump to section ↓
Quick Start
Install Open CLI globally and run your first command in under 60 seconds.
# 1. Install
$ npm install -g github:rythmmcosta/open-cli
# 2. Connect AI provider
$ opencli auth
# 3. Run a prompt
$ opencli "list all .ts files changed today"
# 4. Interactive REPL
$ opencli
Authentication
Open CLI supports four AI providers. Run opencli auth to connect any of them.
Supported Providers
- Anthropic — compatible text models; copy the current model ID from your provider account
- OpenAI — GPT-4o, gpt-4o-mini, o1-preview, o1-mini
- Google Gemini — gemini-2.0-flash, gemini-2.0-flash-lite, gemini-1.5-pro
- Ollama — Any local model (llama3.2, codellama, mistral, etc.)
# Interactive setup
$ opencli auth
# Or use environment variables
$ export ANTHROPIC_API_KEY="sk-ant-..."
$ export OPENAI_API_KEY="sk-..."
$ export GEMINI_API_KEY="AIza..."
CLI Flags
All available flags for the opencli command:
| Flag | Short | Description |
--model <name> | -m | AI model to use |
--skill <name> | -s | Built-in skill to activate |
--yes | -y | Auto-approve low-risk commands |
--dry-run | — | Preview tool calls without executing |
--profile <name> | -p | Apply a saved config profile |
--show-cost | — | Display token usage and estimated cost |
--no-color | — | Disable terminal colors |
--verbose | -v | Show raw tool call details |
--context <file> | -c | Inject a file into the prompt context |
--browser | — | Enable browser automation tools |
--notify | — | Send notification when task completes |
--version | -V | Show version |
--help | -h | Show help text |
# Examples
$ opencli --model gpt-4o "explain this code"
$ opencli --skill python --yes "add tests"
$ opencli --dry-run "delete all node_modules"
$ opencli -c package.json "update to latest deps"
Subcommands
opencli auth
Interactive menu to add/remove/test AI provider API keys.
opencli skills
List all 35 built-in skills with descriptions.
opencli mcp
List all 8 built-in MCP servers and their tools.
opencli config
Show current configuration (model, skill, providers, etc.).
opencli browser <action>
$ opencli browser install # Install Playwright
$ opencli browser screenshot <url> # Take screenshot
$ opencli browser verify <url> # Verify page
opencli agent <subcommand>
$ opencli agent list # List agents
$ opencli agent types # Show types
$ opencli agent run <name> # Run now
$ opencli agent background <name> # Background run
$ opencli agent delete <name> # Delete
opencli notify <subcommand>
$ opencli notify setup # Configure
$ opencli notify test # Test send
$ opencli notify send "Done" --level success
REPL Slash Commands
When running in interactive mode (opencli), these slash commands are available:
| Command | Description |
/auth | Open auth wizard |
/model <name> | Switch AI model |
/skill <name> | Switch skill |
/skills | List all skills |
/profile <name> | Apply a saved profile |
/mcp | List MCP servers |
/browser <action> | Browser commands |
/agent <subcommand> | Agent management |
/notify <subcommand> | Notification commands |
/dry-run | Toggle dry-run mode |
/auto | Toggle auto-approve |
/clear | Clear the screen |
/reset | Reset conversation |
/history | Show message history |
/cost | Show token usage |
/help | Show all commands |
/exit | Exit REPL |
Configuration
Config is stored at ~/.config/opencli/config.json.
{
"defaultModel": "YOUR_MODEL_ID",
"activeSkill": "default",
"autoApprove": false,
"dryRun": false,
"contextWindow": 20,
"showUsage": false,
"providers": {
"anthropic": { "apiKey": "sk-ant-..." },
"ollama": { "baseUrl": "http://localhost:11434" }
}
}
Profiles
Profiles let you save and switch between sets of config: model + skill + system prompt.
"profiles": {
"frontend": {
"model": "YOUR_MODEL_ID",
"skill": "vuejs"
},
"backend": {
"model": "gpt-4o",
"skill": "nodejs",
"system": "Senior backend engineer. Be concise."
}
}
$ opencli --profile frontend "add dark mode toggle"
❯ /profile backend
Environment Variables
API keys can be set via environment variables instead of the config file:
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export GEMINI_API_KEY="AIza..."
# Add to ~/.bashrc or ~/.zshrc to persist
MCP Servers
All 18 MCP servers are built-in. Use opencli mcp to list them.
- filesystem — read_file, write_file, list_files, search_files
- shell — execute_bash
- git — git_command
- browser — navigate, screenshot, click, fill_form, verify, extract
- http — http_request (GET/POST/PUT/DELETE)
- database — db_query, db_schema
- docker — docker_list, docker_logs, docker_exec, docker_compose
- search — web_search, fetch_page
Security
Open CLI uses a 3-tier risk scoring system to keep your system safe.
Risk Levels
- LOW — Read-only commands. Auto-executed with -y.
- MEDIUM — Elevated access (sudo, global installs). Always prompts [Y/n].
- HIGH — Destructive (rm -rf, DROP TABLE). Must type "yes" in full.
Best Practices
- Use --dry-run first on cleanup/delete operations
- Only use -y in trusted, known project directories
- API keys are stored with 0600 permissions — never share your config
- Reading .env, *.pem, or ~/.ssh/* auto-upgrades to MEDIUM risk
Termux (Android)
Full Open CLI works on Termux, except browser automation (Playwright requires a desktop OS).
# Step 1: Install deps
$ pkg update && pkg install nodejs git python make clang
# Step 2: Clone and install
$ git clone https://github.com/rythmmcosta/open-cli.git
$ cd open-cli && npm install && npm run build && npm link
# Step 3: Configure
$ opencli auth
See the full Termux installation guide →