> [繁體中文](./cli-agents-guide.md) | [简体中文](./cli-agents-guide.zh-Hans.md) | **English** # CLI Agents Reference Guide > [← Back to the main path README](../README.en.md) · [A1: Safely run your first small task](../tracks/cli/A1-cli-intro.en.md) This reference doc organizes 9 terminal CLIs around “what do you want to do now?” and checkable official sources. It does not score tools or choose an entry point by popularity or subjective ranking; first identify the role, then choose based on your provider, sign-in method, and safety boundaries. ## First separate the roles: an agent is not a model or API
TypeWhat it doesExamplesDo not confuse it with
LLMGenerates text, code, or tool callsClaude, GPT, GeminiThe model does not automatically have access to files on your computer
Provider APIProvides requests, authentication, and billing for one model providerAnthropic API, OpenAI API, Gemini APIAn API is not a terminal workbench
RouterForwards requests to multiple providersOpenRouterA Router does not manage files or command permissions on an agent’s behalf
Coding agent / harnessReads files, edits, runs commands, and reports results in the terminalClaude Code, Codex, OpenCode, PiIts approval, sandbox, and project trust settings need separate checking
Local runtimeLoads and runs a model locallyOllamaIt can be called by an agent, but it is not a coding agent
## Find an entry point from your situation
Your situationWhat to check firstDifferences to record
You already have an account with a model serviceA CLI from that ecosystem, such as Claude Code, Codex, or Gemini CLISign-in flow, approval, sandbox, and usage page
You need to switch providersOpenCode, goose, Aider, Hermes Agent, or PiSupported endpoints, model IDs, and where API keys are stored
You want to route multiple providers through one placeOpenRouter paired with an agentThe actual provider route, data policy, usage, and billing
You want to practice locallyOllama paired with an agent that supports a compatible APIWhether the model is local, and whether the agent can still run shell commands / write files
## 9 CLI tools The full table is collapsed by default; after expanding it, record the “checked on” date alongside your installed version. Official data checked on: **2026-08-30 UTC**.
Expand installation, authentication, provider, and safety facts for the 9 CLIs
TypeToolWho it currently suitsModel / provider choicesSign-in methodSafe starting pointStatusOfficial sources
Official model ecosystemsClaude CodePeople who want to use the Anthropic ecosystem in the terminalClaude; Anthropic APIClaude account or Anthropic API keyUse a demo repo; keep the permission promptOne of Anthropic’s official terminal, desktop, IDE, and cloud interfacesdocs · repo
Codex CLIPeople who want to use OpenAI / ChatGPT sign-in in the terminalGPT family; OpenAI APIChatGPT sign-in or OpenAI API keyUse the default approval and workspace sandbox; inspect the diff firstOpenAI’s open-source terminal coding agentdocs · repo
Gemini CLIPeople with Google authentication who want Gemini in the terminalGemini; Google AI API or Vertex AIGoogle sign-in, Gemini API key, or Vertex AIUse approval mode; explicitly enable `--sandbox` when neededGoogle’s open-source terminal agentdocs · repo
Grok BuildPeople who want to try xAI’s Grok terminal TUIGrok; xAI sign-in or API keyInteractive browser sign-in on first launch; CI can use `XAI_API_KEY`Start in a demo repo; do not copy `~/.grok/auth.json`xAI’s official open-source TUI coding agentauthentication · repo
Provider-flexibleOpenCodePeople who need to switch among multiple providersMultiple providers; can connect to OpenRouter or a compatible endpointConfigure an API key, OAuth, or environment variable for the providerCheck permission settings first; test outside directories only in a demo repoOpen-source terminal coding agent; `AGENTS.md` has priority, with `CLAUDE.md` as a compatibility fallback when absentprovider · repo
goosePeople who need a CLI, desktop app, or API and want to connect tools and data sources15+ providers, including Anthropic, OpenAI, Google, Ollama, and OpenRouterProvider API key, or ACP sign-in through some existing subscriptionsStart with low-privilege extensions and a sandbox; do not connect production dataAAIF’s open-source local agent, with CLI, desktop, and APIdocs · repo
AiderPeople who want to manage code changes with git diff / commitMultiple cloud APIs, OpenRouter, OpenAI-compatible endpoints, and local modelsProvider API key, config file, or environment variableStart in a clean demo repo; note Aider’s git auto-commit behaviorOpen-source terminal pair-programming tool; official docs specify its git integrationdocs · repo
PiPeople who want to start from a small core and extend it with extensions, skills, or RPCSubscription providers, API-key providers, custom providers; can connect to a local endpoint`/login` or a provider API keyPi has no built-in sandbox; use a disposable repo or container and review commands manuallyAn extensible minimal terminal coding harnessprovider · repo
Hermes AgentPeople who want to use the same agent in a terminal, desktop app, or chat platformNous Portal, OpenRouter, Anthropic, Google, and other providersSet an API key or OAuth with `hermes model`; Nous Portal supports OAuthStart in a low-risk repo; enable skills, MCP, and provider permissions one at a timeNous Research’s open-source agent; docs provide CLI and multi-interface integrationsprovider · repo
### Where do OpenRouter and Ollama fit? OpenRouter is a Router, so it is not one of the 9 coding CLIs above; it provides a unified API, provider routing, and centralized usage. Ollama is a local runtime, not an agent; it can provide a compatible API at `http://localhost:11434/v1` for OpenCode, goose, Aider, or another client. Neither replaces an agent’s file permissions and sandbox design.
## Keep four things when moving a prompt between CLIs 1. Write down the file paths, allowed scope, and the order “list a plan first, then change after confirmation.” 2. Record the model, provider, API key, and approval / sandbox settings separately; do not assume they stay the same when you change CLIs. 3. Describe the goal in ordinary language; use slash commands such as `/login` and `/permissions` only in the relevant tool’s section. 4. Ask for `git diff`, test results, and unfinished items, and restore the worktree before using another CLI.
Expand rules files, sandbox, and common questions - Claude Code’s project rules are in `CLAUDE.md`; Codex uses `AGENTS.md`. OpenCode gives `AGENTS.md` priority and uses `CLAUDE.md` as a compatibility fallback when it is absent; do not treat a nonexistent `OPENCODE.md` as a common format. - Gemini CLI’s project context and `.gemini/` settings follow its official docs; `--sandbox`, approval mode, and `--yolo` have different risks, so do not skip confirmation on your first try. - Pi’s project trust is not a sandbox. Its official safety docs explicitly warn that it runs with the permissions of the user who starts it; use a container or another OS-level boundary when isolation is needed. - Aider’s official docs explain git integration and auto-commit after editing; start in a clean demo repo, inspect the commit, then bring it into a working repo. - For goose, Hermes Agent, and other agents that can connect MCP / extensions, start with a low-privilege, read-only integration; do not use Gmail, Slack, or a production DB as your first external connection. - Put API keys only in an officially supported credential store or environment variable; never put them in a repo, prompt, screenshot, or issue. Calculate cost from the day’s official price and actual usage, not from the model name. #### Official verification entry points (2026-08-30 UTC) - [Claude Code overview](https://code.claude.com/docs/en/overview) · [permissions](https://code.claude.com/docs/en/permissions) - [OpenAI Codex CLI](https://learn.chatgpt.com/docs/codex/cli) - [OpenCode](https://opencode.ai/docs/) · [canonical repository](https://github.com/anomalyco/opencode) - [Gemini CLI](https://google-gemini.github.io/gemini-cli/) - [goose](https://block.github.io/goose/) · [canonical repository](https://github.com/aaif-goose/goose) - [Aider](https://aider.chat/docs/) - [Hermes Agent](https://hermes-agent.nousresearch.com/docs/) - [Grok Build](https://github.com/xai-org/grok-build) - [Pi](https://pi.dev/docs/latest) · [canonical repository](https://github.com/earendil-works/pi) - [OpenRouter FAQ](https://openrouter.ai/docs/faq) · [Ollama](https://ollama.com/)
## Return to Track A - For your first safe operation, return to [A1](../tracks/cli/A1-cli-intro.en.md). - To fix rules files and repeatable workflows in place, go to [A2](../tracks/cli/A2-cli-workflow.en.md). - To work on MCP, CI, and usage traces, go to [A3](../tracks/cli/A3-cli-production.en.md). > Maintenance principle: tools, sign-in, pricing, sandbox, and providers change. Recheck official docs and update the checked-on date before editing the table. Keep this table factual; do not maintain popularity or subjective ratings.