Guides / Coding agents & IDEs / Terminal (CLI) coding agents
⌨️ Best for the job · 5 tools

Best AI coding agents for the terminal (CLI)

CLI coding agents live where your build tools already are. They read the repo, edit files and run commands from the terminal, which makes them easy to script and to pair with any editor.

Ranked by score on our 100-point rubric (how we score). Scores are initial editorial estimates from public information, not hands-on tests. Pricing is labeled verified (checked on the vendor's official pricing page, with date) or unverified.

Quick picks

#ToolTierScoreFree tierPricing
1 Claude Code
Agentic coding in your terminal and IDE
S 89 No verified
2 OpenAI Codex
Cloud and CLI coding agent from OpenAI
S 88 No unverified
3 Gemini CLI
Open-source terminal agent powered by Gemini
A 81 Yes unverified
4 OpenCode
Open-source terminal coding agent
A 77 Yes unverified
5 Aider
Terminal pair programmer with git integration
A 73 Yes unverified

The ranking

  1. 1
    Claude Code
    Agentic coding in your terminal and IDE
    S89/100

    Anthropic's CLI coding agent that reads your repo, edits files, runs commands and integrates with MCP.

    Best for
    You want the strongest autonomous agent for real multi-file work.
    Skip it if
    You want a free tool or a GUI-only workflow.
    Pricing
    Included with Claude Pro ($20/mo, or $17/mo annually) and Max (from $100/mo); not included in the Claude Free plan
    ✓ verified on the official pricing page, Oct 18, 2026
    Platforms
    CLI · Mac · Win · Linux · IDE extension · MCP
  2. 2
    OpenAI Codex
    Cloud and CLI coding agent from OpenAI
    open source S88/100

    OpenAI's coding agent available as an open-source CLI, IDE extension and cloud task runner.

    Best for
    You have ChatGPT and want parallel cloud tasks plus a local CLI.
    Skip it if
    You are not in the OpenAI ecosystem.
    Pricing
    Included with ChatGPT Plus/Pro/Business; API usage also available
    unverified editorial summary, not yet confirmed on an official pricing page
    Platforms
    CLI · web · IDE extension · Mac · Linux · Win
  3. 3
    Gemini CLI
    Open-source terminal agent powered by Gemini
    open source A81/100

    Google's open-source CLI agent with a large context window, MCP support and a free usage tier.

    Best for
    You want a capable free terminal agent.
    Skip it if
    You need the very best code quality on hard refactors.
    Pricing
    Free tier with a personal Google account; paid via API keys
    unverified editorial summary, not yet confirmed on an official pricing page
    Platforms
    CLI · MCP
  4. 4
    OpenCode
    Open-source terminal coding agent
    open source A77/100

    Terminal-first open-source agent with a polished TUI that works with 75+ model providers.

    Best for
    You want a Claude Code-style experience with any model.
    Skip it if
    You want a vendor-supported product.
    Pricing
    Free and open source; pay your model provider
    unverified editorial summary, not yet confirmed on an official pricing page
    Platforms
    CLI
  5. 5
    Aider
    Terminal pair programmer with git integration
    open source A73/100

    Open-source CLI that edits code in your repo and auto-commits, working with most LLMs.

    Best for
    You like the terminal and clean git commits per change.
    Skip it if
    You want a GUI or a fully autonomous agent.
    Pricing
    Free and open source; pay your model provider
    unverified editorial summary, not yet confirmed on an official pricing page
    Platforms
    CLI

Head-to-head comparisons

FAQ

What is the best AI tool for terminal (CLI) coding agents?

Claude Code ranks first with 89/100 (S-tier). Agentic coding in your terminal and IDE. Use it when you want the strongest autonomous agent for real multi-file work. Next in our ranking: OpenAI Codex (88/100, S-tier) and Gemini CLI (81/100, A-tier).

Which AI tools for terminal (CLI) coding agents have a free tier?

In our pricing data, Gemini CLI (unverified), OpenCode (unverified) and Aider (unverified) list a free tier. "Unverified" means it is an editorial summary we have not yet confirmed on the vendor's official pricing page, so check the vendor before relying on it.

Are there open-source options for terminal (CLI) coding agents?

Yes. OpenAI Codex, Gemini CLI, OpenCode and Aider are listed as open source or open weights. Check each project's license before commercial use.

How are these tools ranked?

Each tool is scored out of 100 on our public rubric: job fit (30), ease (15), value (15), momentum (15), openness and portability (10), trust and maturity (10) and a builder/gamer bonus (5). S-tier is 85+, A-tier 70–84, B-tier 55–69 and C-tier below 55. Current scores are initial editorial estimates from public information, not hands-on tests, and sponsors can't buy points.

Related guides

Which AI Weekly

The best new tool for each job, every Friday.

Top new releases, ranked by use case, plus one tier-list shake-up. Free. Unsubscribe anytime.