---
schema_version: 1
revision: "22ce5d34dbcb5a78"
id: "factory-tools-coding-agents"
title: "Terminal coding agents"
---

# Terminal coding agents

Tool roles, alternatives, selection tradeoffs, and compatibility caveats.

## Terminal coding agents

**John uses:** [pi](https://github.com/earendil-works/pi) (71.9k, MIT) as his primary agent — an AI agent toolkit with a unified LLM API, agent loop, TUI, and an extension system (section 01's `pi-session-id` is a pi extension; section 06's swarms use pi's subagent tool). He runs [Codex CLI](https://github.com/openai/codex) (99k, Apache-2.0), [Claude Code](https://github.com/anthropics/claude-code) (138k), and Grok side by side behind two-letter zsh wrappers (section 02) — the whole point of that section is that the wrapper pattern is agent-agnostic.

| Alternative | What it is | How it differs | License |
|----|----|----|----|
| [OpenCode](https://github.com/anomalyco/opencode) | Open-source terminal coding agent, provider-agnostic (any model) | Community-run and model-agnostic where pi/Codex/Claude Code are single-author or lab-tied; largest OSS coding agent by stars | MIT |
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Google's open-source terminal agent for Gemini models | Free tier with a Google account; the Gemini-lab counterpart to Codex/Claude Code | Apache-2.0 |
| [Goose](https://github.com/aaif-goose/goose) | Extensible AI agent (Block) that installs, executes, edits, and tests with any LLM | Extension/MCP-first architecture; works with any LLM rather than one vendor | Apache-2.0 |
| [Aider](https://github.com/Aider-AI/aider) | AI pair programming in your terminal; git-native diff/commit workflow | Pair-programming/chat-over-git model rather than an autonomous agent loop; slower release cadence lately (check repository activity before adoption) | Apache-2.0 |
| [Crush](https://github.com/charmbracelet/crush) | Charm's glamorous terminal coding agent (successor to OpenCode's original TUI) | Strongest TUI polish; multi-provider; source-available license (FSL-family, SPDX NOASSERTION) | NOASSERTION |
| [OpenHands](https://github.com/OpenHands/OpenHands) | AI-driven development platform (formerly OpenDevin) with CLI, GUI, and cloud runtimes | Heavier platform (sandboxed runtimes, web UI) vs a single terminal binary | NOASSERTION |
| [Grok Build (official)](https://x.ai/cli) / [superagent-ai grok-cli (OSS)](https://github.com/superagent-ai/grok-cli) | xAI's official terminal coding agent (subscription); an OSS coding agent for the Grok API | Grok Build is subscription-gated (SuperGrok/X Premium+) with plan mode and 8 parallel subagents; the superagent-ai CLI is MIT OSS against the Grok API | MIT (OSS one); Grok Build is proprietary |

### Pick this if…

- **OpenCode** — you want one agent that isn't tied to any lab and takes any model/provider.
- **Gemini CLI** — you want a capable agent on a free tier with just a Google account.
- **OpenHands** — you want sandboxed/cloud execution and a web UI, not just a terminal.
- **Goose** — your leverage is custom extensions/MCP tools rather than the agent loop itself.
- **Aider** — you want a human-in-the-loop pair programmer with clean git commits, not autonomy.
- **Crush** — you live in the terminal and want the nicest TUI (mind the source-available license).
- **Grok Build / grok-cli** — you're already paying for SuperGrok / have Grok API credits.

## Original references

- [Tool comparison reference](https://dewy-sleet-n5zs.here.now/#coding-agents)
