> [繁體中文](./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
| Type | What it does | Examples | Do not confuse it with |
|---|---|---|---|
| LLM | Generates text, code, or tool calls | Claude, GPT, Gemini | The model does not automatically have access to files on your computer |
| Provider API | Provides requests, authentication, and billing for one model provider | Anthropic API, OpenAI API, Gemini API | An API is not a terminal workbench |
| Router | Forwards requests to multiple providers | OpenRouter | A Router does not manage files or command permissions on an agent’s behalf |
| Coding agent / harness | Reads files, edits, runs commands, and reports results in the terminal | Claude Code, Codex, OpenCode, Pi | Its approval, sandbox, and project trust settings need separate checking |
| Local runtime | Loads and runs a model locally | Ollama | It can be called by an agent, but it is not a coding agent |
| Your situation | What to check first | Differences to record |
|---|---|---|
| You already have an account with a model service | A CLI from that ecosystem, such as Claude Code, Codex, or Gemini CLI | Sign-in flow, approval, sandbox, and usage page |
| You need to switch providers | OpenCode, goose, Aider, Hermes Agent, or Pi | Supported endpoints, model IDs, and where API keys are stored |
| You want to route multiple providers through one place | OpenRouter paired with an agent | The actual provider route, data policy, usage, and billing |
| You want to practice locally | Ollama paired with an agent that supports a compatible API | Whether the model is local, and whether the agent can still run shell commands / write files |
| Group | Project / document | Rating | Use | Limits |
|---|---|---|---|---|
| Official model ecosystems | Claude Code | — | Who it currently suits: People who want to use the Anthropic ecosystem in the terminal Model / provider choices: Claude; Anthropic API | Sign-in method: Claude account or Anthropic API key Safe starting point: Use a demo repo; keep the permission prompt Status: One of Anthropic’s official terminal, desktop, IDE, and cloud interfaces |
Codex CLI | — | Who it currently suits: People who want to use OpenAI / ChatGPT sign-in in the terminal Model / provider choices: GPT family; OpenAI API | Sign-in method: ChatGPT sign-in or OpenAI API key Safe starting point: Use the default approval and workspace sandbox; inspect the diff first Status: OpenAI’s open-source terminal coding agent | |
Gemini CLI | — | Who it currently suits: People with Google authentication who want Gemini in the terminal Model / provider choices: Gemini; Google AI API or Vertex AI | Sign-in method: Google sign-in, Gemini API key, or Vertex AI Safe starting point: Use approval mode; explicitly enable --sandbox when neededStatus: Google’s open-source terminal agent | |
Grok Build | — | Who it currently suits: People who want to try xAI’s Grok terminal TUI Model / provider choices: Grok; xAI sign-in or API key | Sign-in method: Interactive browser sign-in on first launch; CI can use XAI_API_KEYSafe starting point: Start in a demo repo; do not copy ~/.grok/auth.jsonStatus: xAI’s official open-source TUI coding agent Official sources: authentication · repo | |
| Provider-flexible | OpenCode | — | Who it currently suits: People who need to switch among multiple providers Model / provider choices: Multiple providers; can connect to OpenRouter or a compatible endpoint | Sign-in method: Configure an API key, OAuth, or environment variable for the provider Safe starting point: Check permission settings first; test outside directories only in a demo repo Status: Open-source terminal coding agent; AGENTS.md has priority, with CLAUDE.md as a compatibility fallback when absent |
goose | — | Who it currently suits: People who need a CLI, desktop app, or API and want to connect tools and data sources Model / provider choices: 15+ providers, including Anthropic, OpenAI, Google, Ollama, and OpenRouter | Sign-in method: Provider API key, or ACP sign-in through some existing subscriptions Safe starting point: Start with low-privilege extensions and a sandbox; do not connect production data Status: AAIF’s open-source local agent, with CLI, desktop, and API | |
Aider | — | Who it currently suits: People who want to manage code changes with git diff / commit Model / provider choices: Multiple cloud APIs, OpenRouter, OpenAI-compatible endpoints, and local models | Sign-in method: Provider API key, config file, or environment variable Safe starting point: Start in a clean demo repo; note Aider’s git auto-commit behavior Status: Open-source terminal pair-programming tool; official docs specify its git integration | |
Pi | — | Who it currently suits: People who want to start from a small core and extend it with extensions, skills, or RPC Model / provider choices: Subscription providers, API-key providers, custom providers; can connect to a local endpoint | Sign-in method: /login or a provider API keySafe starting point: Pi has no built-in sandbox; use a disposable repo or container and review commands manually Status: An extensible minimal terminal coding harness | |
Hermes Agent | — | Who it currently suits: People who want to use the same agent in a terminal, desktop app, or chat platform Model / provider choices: Nous Portal, OpenRouter, Anthropic, Google, and other providers | Sign-in method: Set an API key or OAuth with hermes model; Nous Portal supports OAuthSafe starting point: Start in a low-risk repo; enable skills, MCP, and provider permissions one at a time Status: Nous Research’s open-source agent; docs provide CLI and multi-interface integrations |