Best for · AI tools
Terminal based AI coding assistants: the CLI agents worth installing
- Last checked
- 9 sources, linked below
- By the vectaai team
We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.
Verdict Our pick
The bar guide has a call.

- Codex CLI if you already pay for ChatGPT, since it signs in with your plan.
- OpenCode if you want open source and any model.
- Aider if you like git-first work where every change is its own commit.
- Grok Build if you already pay for Grok.
Compared here
- 01Claude Code
- 02Codex CLI
- 03GitHub Copilot CLI
- 04Antigravity CLI
- 05Grok Build (grok)
- 06OpenCode
- 07Aider
Short answer
The best terminal based AI coding assistant for most paying developers is Claude Code: install it with one command, run claude in your project, and it reads the codebase, edits files, runs commands, commits and opens pull requests. It comes with Claude Pro at $20 a month ($17 billed yearly). If you want to start free, GitHub Copilot CLI is on every Copilot plan including Free, and Antigravity CLI comes with Google's $0 plan and a weekly agent quota.
Pick Codex CLI if you already pay for ChatGPT, since it signs in with your plan. Pick OpenCode if you want open source and any model. Pick Aider if you like git-first work where every change is its own commit. Pick Grok Build if you already pay for Grok. Facts from each vendor's own page or repository, read 4 December 2026.
Sponsored links. We may earn a commission; it never changes the pick.
At a glance
| Tool | Command | Cheapest way in | Models | Open source | Best for |
|---|---|---|---|---|---|
| Claude Code | claude | Claude Pro $20/mo or $17/mo yearly; or API key | Claude; third-party providers supported in CLI | No license shown on GitHub | Heavy agent work, big refactors |
| Codex CLI | codex | Included with ChatGPT Free (limited), Plus, Pro | OpenAI | Yes, Apache 2.0 | ChatGPT subscribers |
| GitHub Copilot CLI | copilot | Copilot Free $0; Pro $10/mo | Copilot list, or your own provider incl. Ollama | Not checked | GitHub issues and PRs from the terminal |
| Antigravity CLI | Launcher command (agy) | $0 plan, weekly baseline quota | Gemini 4 Hydrogen free; Claude on AI Pro | Not checked | Free agent with subagents |
| Grok Build | grok | Grok Free (limited), Plus $8/mo | Grok; third-party billed separately | No | Grok subscribers, headless CI runs |
| OpenCode | opencode | $0 + your model costs | Any provider | Yes, MIT | Open source, any model |
| Aider | aider | $0 + your model costs | Almost any LLM incl. local | Yes, Apache 2.0 | Git-first pair programming |
Money first. Anthropic, GitHub and OpenAI may pay us through the /go/ links if you subscribe; whether they do depends on programs we are still checking. It does not change the order. The order is how much each tool does in the terminal according to its own docs, and how cheaply you can start.
What we did: on 4 December 2026 we read each vendor's docs and pricing, and for open source tools their GitHub repositories. We did not run a timed coding contest. Speed and code quality depend on your repo, your model and your prompt, and a contest on our toy project would tell you nothing about yours.
Why people want an AI assistant in the terminal
Editor plug-ins finish your lines. Terminal agents finish your tasks. You type "add tests for the auth module, run them, fix failures", and the agent reads files, edits several of them, runs the tests, reads the errors, and tries again. Then it commits.
The terminal is also scriptable. You can pipe logs into an agent, run it in CI, or chain it with git. That is something a chat sidebar cannot do.
The picks
Claude Code: the most complete
From Claude Code's docs: "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools." It also runs in VS Code, JetBrains, a desktop app and the browser, but the terminal CLI is the full-featured one.
What stands out:
- One-line install on macOS, Linux and WSL (
curl -fsSL https://claude.ai/install.sh | bash), PowerShell or CMD on Windows, plus Homebrew, WinGet, apt, dnf and apk. - Git work: stages changes, writes commit messages, creates branches, opens pull requests.
- Scriptable:
tail -200 app.log | claude -p "..."style piping, CI runs with GitHub Actions or GitLab. - Custom rules: a
CLAUDE.mdfile (it can read anAGENTS.mdinstead), skills, hooks and MCP servers. - Parallel agents and background agents watched from one screen.
- Scheduled tasks in the cloud or on your machine.
Price, from claude.com/pricing: not on Free. Pro is $20 a month or $17 billed yearly ($200 up front), Max $100 (5x Pro usage), Ultra $200 (10x weekly, no five-hour limit for verified accounts). Or use an Anthropic Console API key and pay per token.
Pick it if you hand over real tasks every day and want the most mature terminal agent.
Codex CLI: free with your ChatGPT plan
OpenAI's Codex CLI is open source (Apache 2.0). Run codex, choose "Sign in with ChatGPT", and it uses your Plus, Pro, Business, Edu or Enterprise plan; API keys work too. ChatGPT's pricing page lists "Limited Codex access" on Free and "Expanded Codex usage" on Plus, but it did not show us the amounts.
Pick it if you already pay for ChatGPT. Zero extra cost is hard to beat. Our Codex vs Claude Code vs Gemini CLI page compares them head to head.
GitHub Copilot CLI: the GitHub native
From GitHub's Copilot CLI docs: start with copilot, press Shift+Tab for plan mode, or pass one task with -p. It handles local code and git, and GitHub work: issues, pull requests, reviews and Actions workflows. It can sandbox locally (/sandbox enable) or in the cloud (copilot --cloud), and runs on Linux, macOS and Windows.
Models: switch with /model; the latest support a 1 million token context window. You can also bring your own provider, including Anthropic, OpenAI-compatible endpoints and local models like Ollama, if they support tool calling and streaming.
Price: the Copilot plans page lists the CLI on every plan: Free, Pro ($10), Pro+ ($39) and Max ($100). It consumes AI credits by tokens, and one credit is $0.01.
Pick it if your work lives in GitHub issues and PRs, or you want a capable free start.
Antigravity CLI: Google's free agent
Google's Antigravity CLI is "the terminal-first surface to interact with Antigravity agents". It runs background subagents (watch them with /agents), and supports plugins, MCP, skills and hooks through slash commands.
From Antigravity pricing: the $0 Individuals plan includes the app, CLI, IDE extensions and a Python SDK, with a "baseline agent quota refreshed weekly" on Gemini 4 Hydrogen. Google AI Pro and Ultra add stronger Gemini 4 models and Claude Sonnet 5.5 and Opus 5.5 (not on trials); their prices are not on that page. Business starts at $30 a seat a month.
Note: Google's old Gemini CLI README now sends free and AI Pro users here. See our open source AI coding agents page for that story.
Pick it if you want a real agent for $0 and can live inside a weekly quota.
Grok Build: the new home of Cursor's agent
Cursor is now Grok Build. The Grok Build docs say the terminal UI "runs Grok Build as the grok command", interactive or headless for scripts and CI. Grok's pricing lists limited Grok Build requests on Free and Grok Build on Plus at $8 a month, with third-party models billed separately from Premium up. Our Cursor vs GitHub Copilot page covers the change.
Pick it if you already pay for Grok and want a headless agent for CI.
OpenCode: open source, any model
OpenCode (MIT) is the most starred open source coding agent we checked. Two built-in agents switched with Tab: build for full access and plan, which is read-only and asks before running bash commands. Any model provider. You pay only your model bill.
Pick it if you want no vendor lock-in.
Aider: git-first pair programming
Aider (Apache 2.0) maps your codebase, commits every change with a sensible message so git can undo it, lints and tests after edits, and works with almost any model including local ones. Its last push was in May 2026, slower than the others.
Pick it if you love small, reviewable commits.
How to choose in one minute
- Pay for one AI already? Use its CLI: Codex for ChatGPT, Claude Code for Claude, Grok Build for Grok, Antigravity for Google AI Pro.
- Want $0? Copilot CLI Free or Antigravity CLI Free.
- Want open source and any model? OpenCode, or Aider.
- Heavy daily agent work? Claude Code on Max, or Copilot Pro+ for GitHub-heavy teams.
Safety: an agent with a shell is a power tool
- Plan mode first. OpenCode's plan agent and Copilot's Shift+Tab plan mode let you see the approach before edits.
- Work on a branch. One bad run should be one
git resetaway. - Sandbox when you can. Copilot CLI's
/sandbox enableor cloud mode. - Never paste secrets into prompts. Keep keys in environment variables.
- Read the commands. Approving everything blindly is how
rm -rfhappens.
Terminal vs editor vs desktop
Many of these tools now run in several places. Claude Code alone has terminal, VS Code, JetBrains, desktop and web. If you are deciding where to run it, our Claude Code terminal vs VS Code and Claude Code terminal vs desktop app pages go through it.
Questions people ask
What is the best terminal based AI coding assistant?
For paying developers who hand over real tasks, Claude Code: one-line install, reads the whole repo, edits files, runs tests, commits and opens pull requests, on Claude Pro from $17 a month billed yearly. For free, Copilot CLI on Copilot Free or Antigravity CLI on Google's $0 plan. For open source, OpenCode. We did not benchmark them.
Is there a free terminal AI coding assistant?
Yes. GitHub lists Copilot CLI on every plan including Free, which uses limited AI credits. Google's Antigravity $0 plan includes the CLI with a baseline agent quota refreshed weekly. ChatGPT Free lists limited Codex access. OpenCode and Aider are free open source tools, but you pay your model provider unless you run a local model.
Can terminal AI assistants run commands on my machine?
Yes, that is the point: they run tests, git and build commands. Each asks for approval in some form. Copilot CLI offers local sandboxing with /sandbox enable or a cloud sandbox. Claude Code supports hooks and permission settings. Start in a plan or read-only mode, work on a git branch, and read every command before approving.
Do I need a terminal assistant if I have an editor extension?
Not always. Editor extensions are best for suggestions while typing. Terminal agents shine when you script them: Claude Code takes piped input like logs, Copilot CLI has a -p mode that runs one task and exits, and Grok Build runs headless in CI. If you automate reviews, translations or triage, the terminal wins.
Which terminal AI assistant works with local models?
OpenCode and Aider work with local models through providers like Ollama. GitHub's Copilot CLI docs say you can bring your own provider through environment variables, including OpenAI-compatible endpoints, Anthropic and local models such as Ollama, as long as the model supports tool calling and streaming. Claude Code supports third-party cloud providers in its CLI.
Sources
Every fact above comes from these pages. Prices change, so each one carries the date we read it.
- Claude Code docs: Overview, checked 4 Dec 2026
- Claude pricing, checked 4 Dec 2026
- GitHub Docs: About Copilot CLI, checked 4 Dec 2026
- GitHub Copilot plans, checked 4 Dec 2026
- Google Antigravity CLI, checked 4 Dec 2026
- Google Antigravity pricing, checked 4 Dec 2026
- Grok Build docs, checked 4 Dec 2026
- Codex CLI on GitHub, checked 4 Dec 2026
- OpenCode on GitHub, checked 4 Dec 2026