Surfaces

Pattern 20 of 26

TUI and CLI Agents

The fastest interface is the one you are already in

Claude Code, Aider, OpenCode, Gemini CLI, and Goose live in the terminal and work directly with the shell, filesystem, and dev tools. No GUI. No browser tab. They compose with pipes and scripts and can run headlessly in CI without any modification. This is where the power-user workflow lives, and also where automation starts.

Why it matters

CLI agents are the fastest interface to invoke and the easiest to automate. No browser tab needs to be open. No GUI needs to render. They are the same agent in interactive mode and in CI, which matters more than it sounds.

Deep Dive

I use Claude Code as my primary agent surface, so I have spent a lot of time understanding what makes terminal agents different from GUI-first ones. The answer is composition. A terminal agent that can read from stdin, write to stdout, and operate via flags can be wired into anything. It becomes a building block rather than a destination. Aider understood this early and built a git-first workflow where the agent commits changes automatically as it goes. That integration with git was not a cosmetic choice. It made the agent's work auditable and reversible in a way that matters at 2am when something goes wrong.

Claude Code launched in February 2025 with Claude 3.7 Sonnet and set the bar for what this category could look like: full agentic mode, slash commands, a skills system for custom workflows, MCP integration, and a -p flag that enables completely headless non-interactive operation. Gemini CLI came later with 1,000 free requests per day and made the category accessible to a much wider audience. OpenCode supporting 75 plus LLM providers was a different kind of contribution: making the CLI pattern available regardless of which model you prefer.

The constraints of CLI agents are worth understanding because they are not obvious until you hit them. There is no streaming UI, so progress feedback has to come through text output. That requires deliberate prompting design to be useful rather than silent. Session state lives in files, not in-memory UI state. At first this feels like a limitation. In practice it is an advantage for autonomous operation because files are durable across interruptions. The -p flag is where this all comes together: the same agent that works interactively in your terminal runs autonomously in a CI pipeline with no changes to the agent itself.

In the Wild

Claude Code
Aider (39k+ stars)
OpenCode (75+ LLM providers)
Gemini CLI (1,000 req/day free)
Goose (Block)

Go Deeper

ARTICLEClaude 3.7 Sonnet and Claude CodeDOCSClaude Code DocumentationARTICLEIntroducing Gemini CLIDOCSAider Documentation

Related Patterns