curl -fsSL https://raw.githubusercontent.com/OpenAnalystInc/cli/main/install.sh | bash
irm https://raw.githubusercontent.com/OpenAnalystInc/cli/main/install.ps1 | iex
git clone https://github.com/OpenAnalystInc/cli.git cd openanalyst-cli/rust
$ openanalyst login Select your LLM provider to authenticate: > OpenAnalyst gpt-oss-120b free model or API key with credits Anthropic / Claude opus, sonnet, haiku — API key OpenAI / Codex gpt-4o, o3, codex-mini — API key Google Gemini gemini-2.5-pro, flash — API key xAI / Grok OpenRouter 350+ models Amazon Bedrock How would you like to authenticate? > Use free model gpt-oss-120b — no credits needed Use API key OpenAnalyst API with credits Step 1 Connecting to OpenAnalyst... ✓ Connected ✓ Free model access configured Launch OpenAnalyst now? [Y/n] ✓ Login complete
Direct Provider Login — For Claude, Codex, and Gemini you can login directly through your provider account via browser OAuth. No API key needed — just sign in with your existing Anthropic, OpenAI, or Google account. Credentials are stored securely with PKCE and auto-refresh.
> Explain this codebase # openanalyst-beta answers > /model gpt-4o Model updated · Provider: OpenAI Session persisted (3 messages) # conversation carries over > Now fix the bug you found # gpt-4o sees full history > /model gemini-2.5-pro Model updated · Provider: Google Gemini Session persisted (5 messages) # 3 providers, 1 conversation
/effort code max — per-category control/route — view/edit the full routing table/effort high — set all categories globally/knowledge best Meta Ads strategy for D2C brands/feedback corrections.openanalyst/knowledge/OPENANALYST_API_KEY=oa_your_key to access./model now updates the orchestrator config and rebuilds the routing table in real-time. Session persists across provider boundaries. Start with Claude, continue with GPT-4o, finish with Gemini — all in one session./permissions prompt to switch modes at runtime./help to see them all./openanalyst fix all failing tests --criteria "npm test"/oa refactor auth to async --goal "all async" --criteria "npm run build"/oa add caching --max-turns 20--goal (description), --criteria (shell command to verify), --max-turns (default 30). Criteria commands have 60s timeout. Turn budget enforced as hard limit.mcp__ prefix. Execution dispatched to live server processes. /mcp add and /mcp remove manage servers directly./commit generates a message and commits. /pr drafts a pull request. /diff-review gets AI-powered code review of your changes./plugins install <path>. All backed by real PluginManager.unsafe_code = "forbid" enforced at workspace level/hooks.openanalyst/keybindings.json| Command | Description |
|---|---|
| /help | Show all available commands |
| /status | Model, permissions, tokens, cost, session info |
| /cost | Cumulative token usage and cost breakdown |
| /model [name] | Show live models or switch mid-session |
| /clear | Start a fresh session |
| /compact | Smart compact — collapses tool calls, shows token budget %, suggests /clear when needed |
| /memory NEW | Show all memory files — instruction files, project memory, user memory with types |
| /effort [category] [level] NEW | Set thinking effort globally or per-category (explore/research/code/write) |
| /route [category] [tier] NEW | View or edit the per-action model routing table |
| /session [list|switch] | List or switch saved sessions |
| /export [file] | Export conversation transcript |
| /version | Show CLI version and build info |
| /resume <path> | Load a saved session |
| /login NEW | Add or switch provider API keys from REPL |
| /logout NEW | Clear all saved credentials |
| /context NEW | Show context window usage, token counts, model |
| /vim NEW | Toggle vim keybinding mode |
| /whoami NEW | Show all logged-in providers and their status |
| /knowledge <query> NEW | Search the OpenAnalyst knowledge base |
| /explore <url> NEW | Smart-explore a GitHub repo from its history |
| /ask <question> NEW | Quick question — no tools, fast response (alias: /btw) |
| /user-prompt <msg> NEW | Inject a message with full tool access (alias: /up) |
| Command | Description |
|---|---|
| /diff | Show git diff of workspace changes |
| /commit | Generate commit message and commit |
| /commit-push-pr [ctx] | Commit, push, and open a PR |
| /pr [context] | Draft or create a pull request |
| /issue [context] | Draft or create a GitHub issue |
| /branch [list|create|switch] | Manage git branches |
| /worktree [list|add|remove] | Manage git worktrees |
| /teleport <symbol> | Jump to a file or symbol |
| /diff-review [file] NEW | AI-powered review of git diff |
| Command | Description |
|---|---|
| /image <prompt> NEW | Generate image (Gemini Imagen / DALL-E / Stability) |
| /voice <file> NEW | Transcribe audio/video (Whisper / Gemini) |
| /speak <text> NEW | Text-to-speech audio (OpenAI TTS) |
| /vision <image> [prompt] NEW | Analyze image (Gemini / GPT-4o / Claude) |
| /diagram <desc> NEW | Generate Mermaid diagram |
| /translate <lang> <text> NEW | Translate text to any language |
| /tokens [text] NEW | Estimate token count |
| /scrape <url> [selector] NEW | Fetch URL and extract text |
| /json <url> NEW | Fetch JSON API and pretty-print |
| Command | Description |
|---|---|
| /bughunter [scope] | Scan codebase for likely bugs |
| /ultraplan [task] | Deep multi-step planning with reasoning |
| /debug-tool-call | Replay last tool call with debug output |
| /think [prompt] NEW | Force extended thinking for next response |
| /changelog [since] NEW | Generate changelog from git log via AI |
| /doctor NEW | Diagnose installation, provider keys, MCP, workspace |
| /openanalyst <task> NEW | Autonomous agent — think→act→observe→verify loop |
| /swarm <task> NEW | Spawn a swarm of parallel agents for complex tasks |
| Command | Description |
|---|---|
| /config [section] | Inspect config (env, hooks, model, plugins) |
| /memory | Show loaded OPENANALYST.md files |
| /init | Create starter OPENANALYST.md |
| /permissions [mode] | Show or switch permission mode |
| /agents | List configured agents |
| /skills | List available skills |
| /plugin [list|install|enable|disable] | Manage plugins |
| /mcp [list|restart|add] NEW | Manage MCP servers |
| /add-dir <path> NEW | Add directory tree to conversation context |
| Hooks | |
| PreToolUse NEW | Runs before each tool execution — can allow, deny, or warn |
| PostToolUse NEW | Runs after each tool — format-on-save resilience built in |
| CwdChanged NEW | Fires when working directory changes (direnv, monorepo navigation) |
| FileChanged NEW | Fires when a file is modified externally after write/edit |
| SessionEnd NEW | Fires on session close for cleanup, logging, or archival |
| TaskCreated NEW | Fires when a task is created for external tracking systems |
| SessionStart NEW | Fires when a session begins — initialize environment, logging |
| Notification NEW | Fires when the agent wants to notify the user externally |
| Stop NEW | Fires when the agent stops execution — post-run cleanup |
| /hooks [list|add|remove|test] NEW | Manage hooks interactively from the TUI |
| Command | Description |
|---|---|
| /dev install NEW | Install Playwright for browser automation |
| /dev open <url> | Navigate browser to URL |
| /dev screenshot | Capture screenshot of current page |
| /dev snap | Snapshot accessibility tree |
| /dev click <ref> | Click element by a11y reference |
| /dev type <ref> <text> | Type text into element |
| /dev test <desc> | Generate Playwright test via AI |
| /dev codegen | Record browser actions as test code |
| /dev stop | Close browser session |
| /dev status | Show Playwright version and state |
api/ # Multi-provider API client (7 providers) commands/ # 59 slash commands events/ # Shared TUI ↔ backend event types orchestrator/ # Multi-agent lifecycle + channel bridge tui/ # Full-screen TUI application tui-widgets/ # Markdown, tool cards, input, spinner runtime/ # Conversation engine, session, MCP tools/ # 19 built-in tool implementations plugins/ # Plugin system (install, enable, hooks) openanalyst-cli/ # Binary entry point openanalyst-agent/ # Headless autonomous agent runner server/ # HTTP/SSE server (axum) lsp/ # Language Server Protocol integration compat-harness/ # Upstream manifest extraction
| OPENANALYST.md | Project-specific AI instructions (auto-detected in parent dirs) |
| .openanalyst.json | Shared project defaults (permissions, model, tools) |
| .openanalyst/settings.json | Project-level settings |
| .openanalyst/settings.local.json | Machine-local overrides (gitignored) |
| ~/.openanalyst/.env | Provider API keys and environment config (auto-created) |
| ~/.openanalyst/credentials.json | Saved provider API keys |
| .openanalyst/sessions/ | Saved conversation sessions |
| .openanalyst/skills/ | Custom skill definitions |
| .openanalyst/commands/ | Custom slash commands |
OpenAnalyst CLI is an independent, open-source product by OpenAnalyst Inc.
All provider trademarks belong to their respective owners:
Claude — Anthropic, PBC ·
GPT, DALL-E, Whisper, Codex — OpenAI, Inc ·
Gemini, Imagen — Google LLC ·
Grok — xAI Corp ·
Bedrock — Amazon Web Services, Inc ·
OpenRouter — OpenRouter, Inc
Use of these providers' APIs is subject to each provider's Terms of Service. OpenAnalyst CLI facilitates access to these APIs — it does not claim ownership of any provider's services, models, or intellectual property. Licensed under MIT.