A comprehensive comparison of Bare CLI against the leading AI coding agent CLIs: Claude Code, OpenAI Codex, OpenCode, Crush, AmpCode, and Pi-Agent.
| Feature | Bare | Claude Code | OpenAI Codex | OpenCode | Crush | AmpCode | Pi-Agent |
|---|---|---|---|---|---|---|---|
| Language | Go | TypeScript | TypeScript/Node | Go | Go | Go 1.24+ | TypeScript |
| Creator | Self-hosted | Anthropic | OpenAI | anomalyco | Charm | Sourcegraph/Coder | Mario Zechner |
| Philosophy | Deterministic runtime | Full-featured | Sandbox-first | Configurable | Glamorous TUI | Team-focused | Minimal/Opinionated |
| Database | Filesystem | SQLite | - | SQLite | Filesystem | SQLite | JSONL |
| Provider Support | Multi (3) | Anthropic-only | OpenAI-only | Multi (75+) | Multi (20+) | Multi | Multi (20+) |
| System Prompt | Medium | ~3000+ tokens | Medium | Medium | Medium | Large | ~1000 tokens |
| Built-in Tools | Execution, File ops | 10+ tools | Shell, Edit, etc. | 15+ tools | 10+ tools | 15+ tools | 4 tools |
| MCP Support | No | Yes | Yes | Yes | Yes | Yes | No (intentional) |
| Subagents | Via bash | Yes | Yes | Yes | No | Yes (Task tool) | No (intentional) |
| Plan Mode | Via files | Yes | Yes | Yes | No | No (Handoff) | No (intentional) |
| AGENTS.md | No | CLAUDE.md | Yes | Yes | Yes | Yes (Creator) | Yes |
| Hooks/Extensions | Yes (shell) | Yes | Skills | Plugins | Skills | Skills, Toolboxes | Extensions (20+ hooks) |
| Session Structure | Linear | Linear | Linear | Linear | Linear | No compaction | DAG (branching) |
Tagline: "A deterministic coding-agent runtime and CLI for filesystem-backed automation"
- Language: Go 1.22+
- Structure:
cmd/bare/+internal/packagesinternal/domain/- Core domain types and configurationinternal/model/- Provider adapters (OpenAI, Anthropic, ZAI)internal/execution/- Command execution engineinternal/storage/- State persistenceinternal/redaction/- Sensitive value handling
- Commands:
init,run,tick,resume,status,version - Provider Abstraction: Unified interface for OpenAI, Anthropic, ZAI
- Wire API Selection:
chat_completionsvsresponsesper provider - Model Capabilities Matrix: JSON-driven (
models.json) feature detection - Execution Engine: Shell command execution with timeout, output capture
- Verification System:
.bare/verify.d/shell scripts for validation - Hook System:
on_task_start,on_verify_pass/fail,on_task_done, etc.
{
"model": {
"provider": "openai",
"name": "gpt-5.2-codex",
"fallback": "gpt-5-mini",
"providers": {
"openai": { "wire_api": "responses" },
"anthropic": { "wire_api": "chat_completions" },
"zai": { "base_url": "https://api.z.ai/api/paas/v4" }
}
}
}- Deterministic by Design: Explicit wire API selection, no runtime fallbacks
- Verification-First: Built-in verify script system
- Filesystem-Backed State: All state in
.bare/directory - Prompt Caching: Configurable per-provider
- Redaction Layer: Sensitive value filtering before persistence
Tagline: "Anthropic's official agentic CLI for Claude"
- Language: TypeScript
- Core Components:
- CLAUDE.md - Project instructions (hierarchical loading)
- Skills - Reusable workflows (YAML frontmatter + Markdown)
- MCP - Model Context Protocol servers
- Hooks - Lifecycle event scripts
- Subagents - Isolated task execution
| Alias | Model | Use Case |
|---|---|---|
default |
Opus 4.6 / Sonnet 4.5 | Account-dependent |
opus |
Claude Opus 4.6 | Complex reasoning |
sonnet |
Claude Sonnet 4.5 | Daily coding |
haiku |
Claude Haiku 4.5 | Fast/simple tasks |
opusplan |
Opus (plan) → Sonnet (exec) | Hybrid mode |
sonnet[1m] |
Sonnet + 1M context | Long sessions |
opusplanMode: Uses Opus for planning, Sonnet for execution- Effort Levels: Low/Medium/High for Opus 4.6 reasoning
- Context Loading: Progressive disclosure of skills
- Session Memory: JSONL transcripts with summaries
Tagline: "Terminal-based coding agent by OpenAI"
- Language: TypeScript/Node.js
- GitHub:
openai/codex
- Sandbox Mode: Isolated execution environment
- AGENTS.md Support: Project context files
- Model Support: o3, o4-mini, GPT series
- Approval Workflow: Interactive permission prompts
# AGENTS.md
## Build
- `npm run build`
## Test
- `npm test`
## Conventions
- Use TypeScript strict mode- Sandbox Isolation: Security-first execution
- Native OpenAI Integration: First-party support
- Simple Configuration: Markdown-based
Tagline: "Open-source AI coding agent"
GitHub: github.com/anomalyco/opencode | Website: opencode.ai
Note: OpenCode was moved to the
anomalycoorg. Crush is a separate new agent from the Charm team (charm.sh), not a rename of OpenCode.
- Language: Go 1.24+
- TUI Framework: Bubble Tea (Charm)
- CLI Framework: Cobra
- Database: SQLite
- Website: opencode.ai
| Category | Providers |
|---|---|
| Anthropic | Claude Opus 4.5, Sonnet 4.5, Haiku 4.5, 3.7 Sonnet |
| OpenAI | GPT-4.1, GPT-4.5, GPT-4o, O1, O3, O4 Mini |
| Gemini 2.5 Pro/Flash, Gemini 2.0 Flash | |
| GitHub Copilot | GPT-3.5/4/4o, Claude 3.5/3.7, O1, O3 Mini |
| Cloud | AWS Bedrock, Google VertexAI, Azure OpenAI |
| Fast | Groq (Llama 4, QWEN, Deepseek R1) |
| Others | OpenRouter, local via Ollama |
- Remote config (
.well-known/opencode) - Organization defaults - Global config (
~/.config/opencode/opencode.json) - Custom config (
OPENCODE_CONFIGenv) - Project config (
opencode.json) .opencode/directory - agents, commands, plugins- Inline config (
OPENCODE_CONFIG_CONTENT)
- MCP Servers: Local (stdio) and Remote (HTTP/SSE) with OAuth auto-handling
- Custom Agents: Per-task specialized agents with restricted tools
- Commands: Reusable prompt templates with
$ARGUMENTS - Keybinds: Customizable keyboard shortcuts
- Formatters: Integrated code formatting (Prettier, custom)
- Permissions: Tool-level access control (allow, ask, reject)
- Compaction: Auto context compression at 95% capacity
- LSP Integration: Multi-language diagnostics exposed to AI
- Client/Server: Headless mode, web UI, mDNS discovery
{
"mcp": {
"sentry": {
"type": "remote",
"url": "https://mcp.sentry.dev/mcp",
"oauth": {}
},
"my-local": {
"type": "local",
"command": ["npx", "-y", "my-mcp-command"],
"environment": { "MY_VAR": "value" }
}
}
}{
"agent": {
"code-reviewer": {
"description": "Reviews code for issues",
"model": "anthropic/claude-sonnet-4-5",
"prompt": "You are a code reviewer...",
"tools": { "write": false, "edit": false }
}
},
"default_agent": "build"
}| Command | Description |
|---|---|
opencode / opencode tui |
Launch TUI |
opencode run "<prompt>" |
Non-interactive mode |
opencode serve |
Headless HTTP API server |
opencode web |
Web interface |
opencode attach |
Attach to remote backend |
opencode mcp auth <server> |
OAuth authentication |
opencode session |
Session management |
opencode stats |
Token usage/costs |
Tagline: "Glamourous agentic coding for all 💘"
GitHub: charmbracelet/crush | Website: charm.land
Origin: Created by Kujtim Hoxha, acquired by Charm (July 2025). Built on the Charm stack (Bubble Tea, Bubbles, Lip Gloss, Glamour).
- Language: Go
- TUI Framework: Bubble Tea (Charm ecosystem)
- Platforms: macOS, Linux, Windows (PowerShell, WSL), Android, FreeBSD, OpenBSD, NetBSD
- Configuration:
.crush.json,crush.json, or~/.config/crush/crush.json - State Storage:
~/.local/share/crush/
| Category | Providers |
|---|---|
| Anthropic | Claude Opus 4.5, Sonnet 4.5, Haiku 4.5 |
| OpenAI | GPT-4.1, GPT-4.5, GPT-4o, O1, O3, O4 Mini |
| Gemini via VertexAI | |
| Cloud | AWS Bedrock, Azure OpenAI |
| Fast | Groq, Cerebras |
| Aggregators | OpenRouter, Vercel AI Gateway |
| Others | HuggingFace, MiniMax, Z.ai, io.net, Synthetic, local via Ollama/LM Studio |
| Custom | OpenAI-compatible and Anthropic-compatible APIs |
- Multi-Model: Switch LLMs mid-session while preserving context
- Session-Based: Multiple work sessions per project
- LSP-Enhanced: Uses LSPs for additional context
- MCP Support:
stdio,http, andssetransports - Agent Skills: Supports SKILL.md open standard
- AGENTS.md: Can initialize projects with
AGENTS.mdorCRUSH.md - Permissions:
allowed_toolsconfig +--yolomode for autonomy - Catwalk: Community-supported model database with auto-updates
- Logging:
crush logscommand with--followmode
- Glamorous TUI: Beautiful terminal UI built on Charm stack
- Provider Auto-Updates: Automatically fetches new models from Catwalk
- Tool Disabling: Hide specific tools from agent entirely
- Custom Providers: Full support for any OpenAI/Anthropic-compatible API
- Attribution: Configurable git commit trailers (assisted-by, co-authored-by)
- Metrics: Pseudonymous usage tracking (can be disabled)
crush # Interactive TUI mode
crush logs # View recent logs
crush logs --follow # Follow logs in real time
crush update-providers # Update from Catwalk
crush --yolo # Skip all permission prompts
crush --debug # Enable debug logging{
"$schema": "https://charm.land/crush.json",
"lsp": {
"go": { "command": "gopls" },
"typescript": { "command": "typescript-language-server", "args": ["--stdio"] }
},
"mcp": {
"filesystem": {
"type": "stdio",
"command": "node",
"args": ["/path/to/mcp-server.js"],
"timeout": 120
}
},
"permissions": {
"allowed_tools": ["view", "ls", "grep", "edit"]
},
"options": {
"initialize_as": "AGENTS.md",
"disabled_tools": ["bash"]
}
}FSL-1.1-MIT
Tagline: "The frontier coding agent for terminals and editors"
Website: ampcode.com | Manual: ampcode.com/manual
- Language: Go 1.24+ (same as Bare!)
- Database: SQLite 3 (pure Go via ncruces/go-sqlite3)
- Platforms: macOS, Linux, WSL
- Integrations: VS Code, JetBrains (2025.1+), Neovim, Zed
AmpCode uses different models for different purposes:
| Component | Model | Purpose |
|---|---|---|
| Smart Mode | Claude Opus 4.6 | Maximum capability (default) |
| Rush Mode | Claude Haiku 4.5 | Fast/cheap tasks |
| Deep Mode | GPT-5.2 Codex | Extended thinking |
| Oracle | GPT-5.2 (medium reasoning) | Second opinions |
| Painter | Gemini 3 Pro Image | Image generation |
| Tool | Description |
|---|---|
| Oracle | Second opinion from GPT-5.2 with medium reasoning - main agent can autonomously invoke |
| Librarian | Cross-repo research - searches GitHub public/private, Bitbucket Enterprise |
| Painter | Image generation via Gemini 3 Pro Image - mockups, icons, image editing |
| Task | Subagent spawning with isolated context |
| Mermaid | Generate architecture diagrams |
| Code Review | amp review with user-defined Checks |
- 30+ Hour Autonomy: Extended task execution without breaking
- AGENTS.md Creator: Sourcegraph created the standard
- No Compaction: Uses "Handoff" to continue in new threads instead
- Thread Versioning: Shareable URLs (
ampcode.com/threads/T-...) - Toolboxes: Custom tools in ANY programming language (prefix:
tb__) - Skills: Installable packages (
amp skill add ampcode/amp-contrib/tmux) - Permissions: Fine-grained rules (allow, reject, ask, delegate)
amp # Interactive mode
amp -x "message" # Execute mode (single turn)
amp --stream-json # Streaming JSON for programmatic use
amp tools list # List all tools
amp tools make --bash <name> # Create toolbox tool
amp mcp add <name> -- <cmd> # Add MCP server
amp skill add <repo> # Install skill
amp review # Code review with Checks
amp usage # Check usage/credits{
"amp.anthropic.thinking.enabled": true,
"amp.permissions": [],
"amp.mcpServers": {},
"amp.showCosts": true,
"amp.git.commit.coauthor.enabled": true,
"amp.tools.disable": []
}Location: ~/.config/amp/settings.json
- Project root and parent directories (up to
$HOME) - Subtree files included when reading files in that subtree
- Global:
$HOME/.config/amp/AGENTS.md - Supports
@mentions, YAML frontmatter withglobs
| Tier | Cost |
|---|---|
| Free | $10 daily grant (ad-supported) |
| Paid | Pay-as-you-go, no markup |
| Enterprise | +50% cost, SSO, zero data retention |
Tagline: "Minimal, opinionated coding agent"
GitHub: badlogic/pi-mono | NPM: @mariozechner/pi-coding-agent | Website: shittycodingagent.ai
Notable: Powers OpenClaw (145,000+ GitHub stars in one week)
┌─────────────────────────────────────────────────────────┐
│ APPLICATIONS │
│ pi-coding-agent, pi-slack, pi-browser, mom, others │
├─────────────────────────────────────────────────────────┤
│ CORE │
│ pi-agent-core (agent loop, state management) │
├─────────────────────────────────────────────────────────┤
│ FOUNDATION │
│ pi-ai (unified LLM API) pi-tui (terminal UI) │
└─────────────────────────────────────────────────────────┘
| Feature | Pi's Stance | Rationale |
|---|---|---|
| No MCP | Use CLI tools | MCP dumps 13-18k tokens into context |
| No Subagents | Spawn via bash/tmux | Full observability |
| No Permissions | YOLO by default | "Security theater" (Simon Willison) |
| No Plan Mode | Write plans to files | Full observability, collaborative editing |
| No To-Dos | Use TODO.md | "Confuses models more than helps" |
| No Background Bash | Use tmux | Interactive co-debugging |
| No Compaction | Manual /compact |
User controls context |
const tools = ['read', 'write', 'edit', 'bash'];
// The model knows how to use CLI tools via bash.
// Need ripgrep? Run `rg` via bash. Need gh? Run `gh` via bash.- ~1000 Token System Prompt: Smallest in industry (vs 3000+ for Claude Code)
- Session Branching: Append-only DAG structure - fork, navigate, continue from any point
- Cross-Provider Sessions: Switch models mid-conversation, context carries over
- Validation as Tool Results: When tool calls fail validation, error returned to model for self-correction
- 20+ Lifecycle Hooks:
onSessionStart,onBeforeTurn,onToolCall,onToolResult, etc. - Skills with Progressive Disclosure: Only descriptions in context, full content loads on trigger
- Differential TUI Rendering: Flicker-free using synchronized output escape sequences
async function* agentLoop(model, context, tools, options) {
while (true) {
const response = await streamCompletion(model, { ...context, tools });
yield { type: 'assistant_message', content: response.content };
if (!response.toolCalls?.length) break; // Done when no tools
for (const call of response.toolCalls) {
yield { type: 'tool_start', name: call.name };
const result = await executeToolCall(call, context);
yield { type: 'tool_end', name: call.name, result };
}
}
}
// No max-steps knob - "loops until agent says it's done"const extension = {
name: 'my-extension',
onSessionStart: async (ctx) => { },
onBeforeTurn: async (ctx, messages) => messages, // Can modify
onToolCall: async (ctx, call) => { /* can block */ },
onToolResult: async (ctx, result) => result, // Can modify
tools: [{ name: 'custom', execute: async (input) => {...} }],
commands: [{ name: 'cmd', execute: async (args, ctx) => {...} }]
};- Subscriptions: Anthropic Pro/Max, OpenAI Plus/Pro, GitHub Copilot, Gemini CLI
- API Keys: Anthropic, OpenAI, Azure, Google, Bedrock, Mistral, Groq, xAI, OpenRouter, ZAI, more
pi # Interactive mode
pi -p "Summarize codebase" # Non-interactive
pi @code.ts "Review this" # With files
pi --model openai/gpt-4o # Model selection
pi --tools read,grep,find # Read-only mode
pi -c # Continue most recent
pi -r # Browse sessions
pi install npm:@foo/pi-tools # Install package| CLI | Tool Approach | Notable Tools |
|---|---|---|
| Bare | Model proposes → Engine executes | Shell execution, verification scripts |
| Claude Code | Rich built-in toolkit | Read, Write, Edit, Bash, Glob, Grep, Task, WebSearch, WebFetch |
| Codex | Sandbox-isolated | Shell, Edit, Read, Write |
| OpenCode | Configurable + MCP | 15+ built-in + unlimited via MCP, LSP diagnostics |
| Crush | Charm TUI + MCP | View, Ls, Grep, Edit, Bash + MCP tools, LSP integration |
| AmpCode | Multi-tool ecosystem | Oracle, Librarian, Painter, Task, Mermaid, 15+ built-in, Toolboxes, MCP |
| Pi-Agent | Minimal (4 tools) | Only: Read, Write, Edit, Bash - everything else via bash |
| CLI | Tool | Description |
|---|---|---|
| AmpCode | Oracle | Second opinion from GPT-5.2 with medium reasoning |
| AmpCode | Librarian | Cross-repo research (GitHub public/private, Bitbucket) |
| AmpCode | Painter | Image generation via Gemini 3 Pro Image |
| AmpCode | Mermaid | Generate architecture diagrams |
| Claude Code | Task | Subagent spawning with isolated context |
| OpenCode | LSP Diagnostics | Multi-language code intelligence |
| OpenCode | Sourcegraph | Search public repositories |
| Crush | Catwalk | Community model database with auto-updates |
| Pi-Agent | None | Philosophy: "The model knows how to use CLI tools" |
| CLI | Config Style | Location |
|---|---|---|
| Bare | JSON | .bare/config.json |
| Claude Code | CLAUDE.md + Settings | ~/.claude/settings.json |
| Codex | AGENTS.md | AGENTS.md |
| OpenCode | JSON + Markdown | opencode.json + .opencode/ |
| Crush | JSON | .crush.json or ~/.config/crush/crush.json |
| AmpCode | AGENTS.md | AGENTS.md |
| Pi-Agent | AGENTS.md + SYSTEM.md | .pi/ directory |
| CLI | Anthropic | OpenAI | Others | |
|---|---|---|---|---|
| Bare | ✅ | ✅ | ❌ | ZAI |
| Claude Code | ✅ Only | ❌ | ❌ | Bedrock, Vertex |
| Codex | ❌ | ✅ Only | ❌ | ❌ |
| OpenCode | ✅ | ✅ | ✅ | Bedrock, many more |
| Crush | ✅ | ✅ | ✅ | Bedrock, Azure, Groq, 20+ |
| AmpCode | ✅ | ✅ | ✅ | Multi-provider |
| Pi-Agent | ✅ | ✅ | ✅ | 20+ providers |
Four of the seven CLIs in this comparison are Go-based, proving Go is a first-class language for AI coding tools:
| Aspect | Bare | OpenCode | Crush | AmpCode |
|---|---|---|---|---|
| Go Version | 1.22+ | 1.24+ | Go | 1.24+ |
| Database | Filesystem | SQLite | Filesystem | SQLite |
| TUI | No | Yes (Bubble Tea) | Yes (Bubble Tea) | No |
| Philosophy | Deterministic | Configurable | Glamorous | Team-focused |
| MCP | No | Yes | Yes | Yes |
| AGENTS.md | No | Yes | Yes | Yes (Creator) |
Key Insight: The Go ecosystem for AI CLIs is thriving. Bare differentiates by being the "deterministic Go alternative" with verification-first approach, while Crush offers the most polished TUI experience.
- Determinism: Explicit wire API selection, no magic
- Verification-First: Built-in test/verify workflow
- Provider Abstraction: Clean separation of concerns
- Go Performance: Compiled, fast, single binary
- Filesystem-Backed: All state visible and versionable
- Redaction Layer: Security-conscious output handling
- No MCP Support: Industry standard for tool integration
- No Subagents: Parallel task execution limited
- No AGENTS.md: Standard context file support
- Limited Tool Set: Could benefit from more built-in tools
- No Session Branching: Pi's DAG approach is powerful
- No Skills System: Reusable workflows missing
- Be the Deterministic Go Alternative: Stand out among Go CLIs (OpenCode, Crush, AmpCode)
- Determinism as Feature: Market the explicit wire API configuration
- Verification-First: Unique value prop for CI/CD pipelines
- Hybrid Approach: Combine Pi's minimalism with Crush's TUI polish
- Provider Agnostic: True multi-provider support (like Crush, OpenCode)
| Lesson | Source | Application to Bare |
|---|---|---|
| Minimal prompts work | Pi-Agent (~1k tokens) | Audit system prompt, remove bloat |
| Session branching is powerful | Pi-Agent (DAG) | Add forking to session structure |
| Tool validation as feedback | Pi-Agent | Return validation errors to model |
| Oracle pattern | AmpCode | Add second-opinion model tool |
| Handoff > Compaction | AmpCode | Continue work in new context vs summarize |
| Toolboxes in any language | AmpCode | Support custom tools beyond shell |
| Glamorous TUI matters | Crush | Consider Bubble Tea for interactive mode |
| LSP integration | OpenCode, Crush | Add LSP context for better code understanding |
| Provider auto-updates | Crush | Community-driven model database |
| AGENTS.md is standard | All others | Must add for ecosystem compatibility |
| MCP is ecosystem | Most others | Essential for tool marketplace |
| SQLite for state | OpenCode, AmpCode | Consider for complex state management |
- Add AGENTS.md Support - Industry standard for context
- Add MCP Support - Tool ecosystem access
- Add Subagent Capability - Parallel task execution
- Add Skills System - Reusable workflow templates
- Add Session Branching - Pi-style DAG sessions
- Add Built-in Tools - Glob, Grep, WebSearch
- Add TUI Mode - Interactive interface
- Add Plugin System - Extension marketplace
- Add Web Dashboard - Usage monitoring
- Local codebase exploration at
/home/niko/bare
- AmpCode Manual
- AmpCode Appendix
- AmpCode Models
- AmpCode SDK
- Sourcegraph Amp
- Amp Code AI Review 2026
- AMP vs Claude Code Comparison
- Writing Secure Code with AMP
- r/AmpCode Reddit
- Pi-Agent Repository
- Pi-Agent NPM Package
- Pi Website
- Mario Zechner's Blog Post
- Armin Ronacher's Pi Analysis
- Awesome Pi-Agent
- Pi: Anatomy of a Minimal Coding Agent
Generated: 2026-02-15 | Updated with Crush research