Best AI Coding Agents for the Terminal

Compare terminal AI coding agents: opencode, Claude Code, codex, Gemini CLI, aider, Goose and Open Interpreter by workflow and model support.

Updated

short verdict

OpenCode is the best default if you want an open source terminal agent with a read-only plan mode and a TUI. Pick Claude Code or Codex if you already pay for those vendors' plans, Gemini CLI for a free OAuth tier and scripting, and Aider if you want every change committed to git. Goose suits teams that want many providers and MCP extensions; Open Interpreter fits code execution beyond editing a repo.

A terminal coding agent reads your repository, proposes edits, runs commands and reports back from a prompt. The tools here differ in which models they connect to, how they gate file edits and shell commands, how they record changes in git, and whether they are built around editing code or running it.

this page is for

  • Developers who want an AI agent inside the terminal instead of an IDE
  • Teams choosing between vendor-tied agents and multi-provider agents
  • Developers who want AI changes tracked as git commits
  • Engineers scripting agents in CI or automation
#1

opencode

★ 222.7kTypeScript
details

Open source TUI agent with a full-access build agent and a read-only plan agent you toggle with Tab.

best for

  • Exploring unfamiliar codebases safely
  • Developers who want an open source terminal agent

strengths

  • plan agent denies edits and asks before bash commands
  • Installs via npm, Homebrew, Scoop, Chocolatey, pacman, Nix or curl
  • @general subagent handles multistep searches
  • Beta desktop app for macOS, Windows and Linux

weaknesses

  • Desktop app is still in beta
  • Configuration details live in online docs, not the README
#2

Claude Code

★ 153.7kTypeScript
details

Terminal assistant that handles git workflows in natural language and extends through plugins.

best for

  • Developers who want git tasks handled by prompt
  • Teams that want GitHub @claude mentions

strengths

  • Plugin system adds custom commands and agents
  • Works in terminals, IDEs and GitHub via @claude
  • Installs with curl, Homebrew cask or WinGet
  • /bug command reports issues from the session

weaknesses

  • Collects usage and conversation data, including accept/reject feedback
  • No license listed in the project metadata
#3

codex

★ 131.4k
details

OpenAI's local coding agent that signs in with an existing ChatGPT plan or an API key.

best for

  • ChatGPT Plus, Pro, Business, Edu or Enterprise subscribers
  • Developers who also use VS Code, Cursor or Windsurf

strengths

  • Authenticates with ChatGPT account or API key
  • IDE extensions for VS Code, Cursor and Windsurf
  • codex app opens a desktop mode
  • Installs with npm or Homebrew cask

weaknesses

  • Tied to OpenAI accounts and models
  • CLI platform list covers macOS and Linux only
#4

gemini-cli

★ 108.6kTypeScript
details

Gemini-backed agent with a free Google OAuth tier, MCP support and JSON output for scripts.

best for

  • Free usage with a Google account
  • Automation and GitHub Actions workflows

strengths

  • OAuth free tier of 60 requests/min and 1,000/day
  • Non-interactive mode with JSON output
  • GEMINI.md context files and session checkpointing
  • Built-in Google Search grounding and web fetch

weaknesses

  • Limited to Google Gemini models
  • Free tier rate limits cap heavy sessions
#5

aider

★ 49.8kPython
details

Python pair-programming tool that commits each AI change to git and works with hosted or local models.

best for

  • Developers who review AI work with git diff
  • Mixing hosted and local models

strengths

  • Auto-commits with descriptive messages
  • Builds a map of the whole codebase
  • Runs linting and tests on AI changes
  • Voice input and file-watching IDE integration

weaknesses

  • Installed via Python with aider-install
  • Pair-programming flow, not an agent with plan and build modes
#6

Goose

★ 55.9kRust
details

Rust agent with CLI, desktop app and API, supporting 15+ providers and 70+ MCP extensions.

best for

  • Teams standardizing on several model providers
  • Work beyond coding, such as research and automation

strengths

  • Connects to Anthropic, OpenAI, Google, OpenRouter, Azure and AWS Bedrock
  • 70+ extensions through Model Context Protocol
  • Custom distributions with preset providers and extensions
  • Desktop app for macOS, Linux and Windows

weaknesses

  • General-purpose scope, not focused on code editing
  • Only a curl script install is documented for the CLI
#7

Open Interpreter

★ 68.7kPython
details

Runs generated Python, JavaScript and Shell locally after you approve each step.

best for

  • Data analysis and file or media tasks
  • Embedding in Python via interpreter.chat()

strengths

  • Approval prompt before any generated code runs
  • Connects to hosted and local models via LiteLLM
  • YAML profiles and optional FastAPI server
  • Conversation history persists across sessions

weaknesses

  • Focused on code execution, with no git-commit workflow
  • Installs from a git URL with pip

How to choose

Match the tool to your model access, your review habits and where the agent will run.

  • Open source with a safe exploration mode: OpenCode, through its read-only plan agent.
  • Existing vendor subscription: Codex for ChatGPT plans, Claude Code for Claude.
  • Free tier and scripting: Gemini CLI, with OAuth limits and JSON output for CI.
  • Git-centered review: Aider, which commits every change with a message you can diff.
  • Many providers and MCP extensions: Goose, with 15+ providers and 70+ extensions.

When not to use these

  • You need a fully managed, in-editor experience with no terminal use.
  • Your code cannot be sent to any hosted model and you have no local model available to connect.

FAQ

Which terminal AI coding agent has a free tier?
Gemini CLI offers a free tier through Google OAuth, with 60 requests per minute and 1,000 requests per day. The other tools here connect to model providers or subscriptions you supply.
Which agents can use local models?
Aider works with local models, and Open Interpreter connects to local inference servers through LiteLLM. Goose also supports a broad set of providers.
Which tool commits changes to git automatically?
Aider commits AI changes with descriptive messages so you can review them with standard git tools. Claude Code can also handle git workflows from natural language prompts.
Can I use these agents in automation?
Gemini CLI has a non-interactive mode with JSON output and a GitHub Actions integration. Open Interpreter can run as a FastAPI server, and Goose exposes an API.