
XDA’s piece on borrowing Anthropic engineers’ Claude prompts ended on a quiet point: the prompts mattered less than where they ran. The good ones lived in a CLI, hooked into the shell, ran on a repo on disk, and never bounced to a browser tab. Terminal-first AI tooling is now where most of the productivity gain is, and 2026 is the year the second wave of open-source CLI assistants started catching the commercial leaders.
We tested seven AI command-line tools in 2026. The picks below cover the commercial flagships, the open-source pure-OSS picks, and the lightweight one-shot shell helpers worth keeping in your dotfiles.
What to look for in an AI CLI
- Agentic loop. Older CLIs answered one prompt at a time. The 2026 cohort plans multi-step changes, runs commands, reads errors, and iterates without intervention.
- Repo awareness. Tools that build a repo map and load only relevant files outperform context-stuffers on real codebases.
- Multi-model support. Locking to one provider hurts when that provider’s model lags. The picks below either support multiple model providers or interoperate cleanly.
- Sandboxing. Anything that runs
rm -rfshould ask first. We flagged tools without confirmation gates. - Cost transparency. Some CLIs ship with included credits, others bill the underlying API. Know which one you are running before you start.
Quick comparison
| Tool | Best for | Open source | Cost | Terminal-Bench 2.1 |
|---|---|---|---|---|
| Claude Code | Whole-codebase agentic work | No | Subscription / API | 78.9% |
| OpenAI Codex CLI | OpenAI-centric workflows | Yes | API or ChatGPT plan | 83.4% |
| Aider | Repo-aware pair programming | Yes | BYO API key | Not benchmarked |
| Gemini CLI | Million-token sessions, free tier | Yes | 1000 req/day free | 71% |
| GitHub Copilot CLI | Shell history, gh integration | No | Copilot subscription | n/a |
| Simon Willison’s llm | One-shot shell prompts | Yes | BYO API key | n/a |
| Shell GPT | Quick command-line completion | Yes | OpenAI API | n/a |
The 7 best AI CLI tools for PC
1. Claude Code — best for whole-codebase agentic work
Claude Code is Anthropic’s terminal-native coding agent. It runs Claude Opus 4.7 and Sonnet 4.6 in an agentic loop, plans multi-step changes, reads and writes files inside a working directory, and runs tests on the fly. The Opus context window extends to one million tokens, which is the practical reason it leads on whole-repo refactors. Claude Code installs through npm or as a native binary on macOS, Linux, and Windows.
Where it falls short: Closed source. Anthropic’s API pricing is the highest of the commercial CLIs. Free-tier access is gated behind a Claude Pro subscription with monthly usage caps.
Pricing: $20/mo Claude Pro plan with limited CLI usage, $100+ for higher-tier plans, or pay-per-token via the Anthropic API.
Platforms: Windows, macOS, Linux.
Download: claude.com/code
Bottom line: The deepest agentic CLI in 2026. If the project lives in a Git repo, this is the right pick.
2. OpenAI Codex CLI — best on Terminal-Bench
OpenAI Codex CLI leads Terminal-Bench 2.1 at 83.4%, just ahead of Claude Code. It is OpenAI’s open-source terminal coding agent: install with one command, sign in with a ChatGPT plan, get the same coding model the IDE plugin uses. The agent handles plan-then-act flows, tool calls, and shell invocation with confirmation.
Where it falls short: Subscription-aligned. Without a Plus or Pro ChatGPT plan, every request hits the OpenAI API directly.
Pricing: Free with a ChatGPT Plus or Pro subscription ($20/mo or higher); otherwise pay per OpenAI API call.
Platforms: Windows, macOS, Linux.
Download: github.com/openai/codex
Bottom line: Pick this over Claude Code if your team is already on a ChatGPT plan.
3. Aider — best for repo-aware pair programming
Aider built the “repo map” pattern: walk the codebase, summarise file relationships, and load only the files relevant to the current request. The 2026 release improved auto-tested edits and made multi-provider model selection painless. Aider works against OpenAI, Anthropic, Google, DeepSeek, and any OpenAI-compatible local model.
Where it falls short: Slightly less polished UX than the commercial flagships. The plan-and-execute loop is shorter than Claude Code’s; large refactors need more guidance.
Pricing: Free and open source (Apache 2.0). Brings its own API costs based on the chosen provider.
Platforms: Windows, macOS, Linux.
Download: aider.chat
Bottom line: The strongest fully open-source CLI in 2026. Pair-programming flow that competes with the closed leaders.
4. Gemini CLI — best free tier
Gemini CLI is Google’s open-source terminal agent. The free tier ships 1,000 requests per day, and the context window goes to one million tokens. Multi-file edits, shell tools, and Git-aware diffs are all built in. The model behind it (Gemini 2.5 Pro) lags Anthropic and OpenAI on the toughest benchmarks but is more than enough for everyday work.
Where it falls short: Tool-call accuracy is behind Claude Code and Codex CLI on multi-step tasks. The free tier rate-limits aggressively after the first 200 requests.
Pricing: Free with 1,000 requests/day. Paid tier via the Gemini API.
Platforms: Windows, macOS, Linux.
Download: github.com/google-gemini/gemini-cli
Bottom line: The free pick if a daily request cap is acceptable.
5. GitHub Copilot CLI — best for shell workflow tightness
GitHub Copilot CLI ships as gh copilot, integrated directly with the GitHub CLI. The two commands that matter are gh copilot suggest (build a command from a natural-language description) and gh copilot explain (walk through a complex command). The 2026 release added agent-mode planning and pull-request authoring from the shell.
Where it falls short: Locked to GitHub Copilot subscribers. Less useful outside the shell and Git workflow.
Pricing: Included with GitHub Copilot Pro at $10/month.
Platforms: Windows, macOS, Linux.
Download: docs.github.com — Copilot in the CLI
Bottom line: A no-brainer if you already pay for Copilot. It pays back the subscription in the shell alone.
6. Simon Willison’s llm — best for one-shot prompts
Simon Willison’s llm is the smallest CLI on this list and the most composable. It accepts a prompt on the command line, prints the answer, and exits. Plugins add image input, embedding generation, conversation logging, and adapters for every major model provider. Perfect for piping shell output through a model on the fly.
Where it falls short: Not an agentic tool. It will not plan or execute multi-step changes. It is a single-prompt utility by design.
Pricing: Free and open source (Apache 2.0). BYO API key.
Platforms: Windows, macOS, Linux.
Download: llm.datasette.io
Bottom line: The Unix philosophy applied to LLMs. Indispensable in shell pipelines.
7. Shell GPT — best for quick command completion
Shell GPT (sgpt) is a Python-based CLI for one-shot shell completion. Type a question, get an answer or a ready-to-run shell command. The 2026 release added local-model support through Ollama, so the same shortcut works without sending data to an API.
Where it falls short: The codebase has not seen a major refactor in two years; some features have been overtaken by llm. Local-model support is functional but slow.
Pricing: Free and open source (MIT). BYO API key or local model.
Platforms: Windows, macOS, Linux.
Download: github.com/TheR1D/shell_gpt
Bottom line: Still the easiest way to get an AI command generator behind a single shell alias.
How to pick the right one
- If you do deep, agentic work on a codebase you own: Claude Code. The depth pays back the subscription.
- If your team already uses ChatGPT Plus or Pro: OpenAI Codex CLI. Free with the plan, top of Terminal-Bench.
- If you want a fully open-source pair programmer: Aider.
- If you do not want to pay anything: Gemini CLI for daily work, llm or Shell GPT for one-shot prompts.
- If you already pay for GitHub Copilot:
gh copilot, no extra spend. - If you want a tool that works offline: Shell GPT with an Ollama local model.
- Skip the whole stack if your shell time is primarily Bash plumbing and not coding. The IDE plugins return more value per dollar for non-developers.
FAQ
Which AI CLI is the smartest in 2026? On Terminal-Bench 2.1, Codex CLI leads at 83.4% and Claude Code follows at 78.9%. In practice the two trade wins depending on language and task; Claude Code wins on Python and full-stack web; Codex CLI wins on TypeScript and Rust.
Can I use these tools with a local model? Aider, Shell GPT, Gemini CLI, and llm all support local models through Ollama or LM Studio. Claude Code and Codex CLI are cloud-only.
Do AI CLIs have access to the filesystem? Yes, every agentic CLI on this list reads and writes files inside a working directory. Each one asks for confirmation before destructive shell commands; configure the confirmation level explicitly before granting write access to important repositories.
What is the cheapest path to a daily-driver AI CLI? Gemini CLI’s 1,000-request free tier plus Aider with a low-cost provider like Deepseek or Mistral. Most full-day usage stays under $1 of API spend.
Are these CLIs available on Windows? All seven run natively on Windows 10 and 11. Most are easier to install through PowerShell or WSL2 than through cmd.exe.