Terminal coding agents read a repository, edit files and run shell commands with the developer's own access, and each one exposes different controls for what it may do without asking. This page sets out five command line coding agents side by side with identical fields: Amp, Claude Code, Codex CLI, Gemini CLI and OpenCode. It covers who publishes each tool, how it is licensed and installed, how a developer gets access and what it costs, which models it uses, how its permission and sandbox controls work, which instruction and configuration files it reads, and what administrators can enforce. It is written for developers choosing a terminal agent and for the platform and security teams who approve one. Tools are listed alphabetically; order is not a ranking, and the page gives no verdicts. Last checked: 2026-11-15.
This is an independent reference page from NHI Mgmt Group based on public provider documentation; it is not sponsored or endorsed by any provider.
Key takeaways
- Three are open source, two are not. Codex CLI and Gemini CLI carry the Apache License 2.0 and OpenCode the MIT License in their repositories; Claude Code's repository licence states use is subject to Anthropic's Commercial Terms, and Amp states no open-source licence.
- Access routes differ. Claude Code is included in paid Claude plans; Codex CLI is included from ChatGPT Plus upwards or usable with an API key; Gemini CLI is now aimed at Gemini Code Assist Standard and Enterprise licences; Amp has a free Hobby tier and paid tiers; OpenCode connects to many model providers and offers its own OpenCode Go subscription.
- Gemini CLI changed scope in 2026. Its repository and documentation state that free individual access and Google AI Pro and Ultra users moved to Antigravity CLI on 18 June 2026.
- Every tool has rule-based permissions. Amp and OpenCode use allow, ask and deny style rules; Claude Code uses named permission modes plus rules; Codex CLI combines sandbox modes with approval policies; Gemini CLI has approval modes and folder trust.
- OS-level sandboxing is documented for three. Claude Code, Codex CLI and Gemini CLI document operating system sandboxes for shell commands; Amp documents cloud machines (orbs) per thread and a delegate hook for external policy; OpenCode documents permission rules per agent.
What counts as a CLI coding agent on this page?
A CLI coding agent is a program a developer runs in a terminal that takes a natural language task, reads the files in the current project, proposes or makes edits, and runs commands such as tests, builds or Git operations in a loop until the task is done. Most of these tools now also ship editor extensions, desktop apps or cloud runners; this page compares the command line agent and the controls around it. The five tools here are those named in the page title. Other terminal agents exist, including the Kiro CLI (see the Kiro guide), Cursor's CLI (see the Cursor guide) and Antigravity CLI (see the Google Antigravity guide). For the whole market, see the AI Coding Tools Hub; for the difference between an assistant and an autonomous agent, see AI Coding Assistants vs Autonomous Coding Agents.
CLI coding agents at a glance
As of 15 November 2026, from each provider's own documentation, pricing page or repository.
| Field | Amp | Claude Code | Codex CLI | Gemini CLI | OpenCode |
|---|---|---|---|---|---|
| Publisher | Amp (ampcode.com) | Anthropic | OpenAI | Anomaly (footer copyright on opencode.ai) | |
| Licence | Not stated by Amp | Commercial Terms of Service (repository LICENSE.md) | Apache License 2.0 | Apache License 2.0 | MIT License |
| Command | amp | claude | codex | gemini | opencode |
| Other surfaces | Web, apps for Mac, Windows, Linux, iPhone, iPad and Android | VS Code, JetBrains, desktop app, web, mobile | IDE extension, desktop app (codex app), Codex Web | Gemini Code Assist | Desktop app (beta), web app |
| Install routes | Account at ampcode.com; CLI | Native installer, Homebrew, WinGet, apt, dnf, apk | Standalone installer, npm, Homebrew, GitHub Releases | npm, npx, Homebrew, MacPorts | Install script, npm and other JavaScript package managers, Homebrew, AUR, mise, Nix, Docker image |
| Instruction file | AGENTS.md | CLAUDE.md (reads AGENTS.md where present) | AGENTS.md | GEMINI.md (name set by context.fileName) | AGENTS.md (CLAUDE.md as fallback) |
| MCP support | Yes | Yes | Yes | Yes (mcpServers) | Yes |
| Security guide on nhimg.org | See general guides below | Claude Code Security Guide | OpenAI Codex Security Guide | Gemini CLI Security Guide | See general guides below |
How much do CLI coding agents cost?
Prices as shown on each provider's pricing page on 15 November 2026, in US dollars per month unless stated. Plans and limits change often; record the date whenever you quote one. For prices across all AI coding tools, see the AI Coding Tools Pricing Tracker.
| Tool | No-cost route | Individual paid route | Team and enterprise route | Bring your own key |
|---|---|---|---|---|
| Amp | Hobby: no monthly fee; Amp-hosted orbs pay-as-you-go | Individual $20 (Megawatt); Education $10 | Teams: no extra workspace charge, pooled credits; Enterprise: custom, pooled credits only | Yes, with no Amp token fees on the Hobby tier; optional ChatGPT Plus or Pro sign-in for OpenAI models |
| Claude Code | Not included in Claude Free | Pro $20 monthly ($17 per month billed annually); Max $100; Ultra $200 | Team Standard seat $25 monthly ($20 annually); Team Premium seat $125 monthly ($100 annually); Enterprise $20 per seat billed annually, 20-seat minimum, usage at API rates | Anthropic Console account or third-party providers (Terminal CLI, VS Code, JetBrains) |
| Codex CLI | ChatGPT Free and Go list Codex in the desktop app, subject to rollout | ChatGPT Plus $20 (web, CLI, IDE extension, iOS); Pro from $100 ($100, $200 or $500) | Business $25 per user monthly ($20 annually, 2+ users); Enterprise and Edu through sales | API key for CLI, SDK and IDE extension, billed at API pricing |
| Gemini CLI | Free individual access moved to Antigravity CLI on 18 June 2026 | Google AI Pro and Ultra moved to Antigravity CLI on 18 June 2026 | Gemini Code Assist Standard or Enterprise, or Code Assist for GitHub, on Google Cloud (price not stated on Gemini CLI pages) | Gemini API key or Vertex AI (described as legacy paid API and Vertex keys) |
| OpenCode | The CLI is MIT-licensed; model costs depend on the connected provider | OpenCode Go $10 | Not stated by Anomaly | Yes, providers connected with /connect |
Models each agent uses
| Tool | Models as stated by the provider | Source |
|---|---|---|
| Amp | Multi-model: GPT-5.6, Claude Fable 5.2 and fast models, each used for different jobs; paid tiers include credits usable on any model | Amp manual; pricing page |
| Claude Code | Claude models through a Claude subscription or Anthropic Console; third-party providers supported for the Terminal CLI, VS Code and JetBrains | Claude Code overview |
| Codex CLI | GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Sol, GPT-6 Luna and others listed on the Codex pricing page; GPT-5.5 retired 14 October 2026 | Codex pricing page |
| Gemini CLI | Gemini models; the repository states the harness is not tuned for the Gemini 4 series and should not be used for model benchmarks | Gemini CLI repository README |
| OpenCode | Built-in support for many LLM providers plus custom providers; OpenCode Go subscription for hosted coding models | OpenCode docs |
For the underlying models and their published scores, see Coding LLMs Compared.
Permissions, approvals and sandboxing
This is where the tools differ most, and where an organisation's approval decision usually rests. Each subsection uses the same three headings: approval model, isolation and enforcement.
Amp
- Approval model: rules under the
amp.permissionssettings key are checked in order before every tool call, and the first match decides. Actions areallow,ask,rejectanddelegate --to <program>, where a helper program returns exit code 0 to allow, 1 to ask and 2 to reject. Rules match tool names such asBashormcp__*and arguments such ascmd, with*wildcards. If nothing matches, Amp applies built-in defaults (announced 7 August 2025). - Isolation: Amp documents orbs, cloud machines created per thread with the code, tools and plugins set up; self-hosted orbs and runners are also listed.
- Enforcement: Amp's permissions page shows central decisions through a delegate helper that forwards tool arguments to an Open Policy Agent server. CLI commands are
amp permissions edit,addandtest.
Claude Code
- Approval model: permission modes set by
permissions.defaultMode:default(Manual, reads only without asking),acceptEdits,plan,auto(a separate classifier model reviews actions),dontAsk(anything that would prompt is denied) andbypassPermissions(intended only for isolated containers and VMs). Deny rules apply in every mode, and writes to protected paths such as.git,.claudeand.bashrcare never auto-approved outsidebypassPermissions. - Isolation: an OS-level Bash sandbox on macOS, Linux and WSL2, turned on with
/sandboxorsandbox.enabled; sandboxed commands get no network access by default, and strict sandbox mode turns off unsandboxed retries. - Enforcement: managed settings outrank user settings and include
permissions.disableAutoModeandpermissions.disableBypassPermissionsMode.
Codex CLI
- Approval model: sandbox modes
read-only,workspace-writeanddanger-full-access, combined with approval policieson-request,neveror agranulartable. TheAutopreset is workspace-write with on-request approvals; version-controlled folders get Auto and other folders read-only. The olderuntrustedpolicy is retired. Anapprovals_reviewersetting can route eligible requests to a reviewer agent. - Isolation: Seatbelt on macOS,
bwrapplusseccompon Linux, MXC on Windows, and the Linux sandbox on WSL2. Network access is off by default, and.git,.agents,.codexand.awsstay read-only inside writable roots. - Enforcement: managed configuration can restrict
allowed_approval_policies,allowed_approvals_reviewersandallowed_web_search_modes, with MDM requirements taking precedence.
Gemini CLI
- Approval model: approval modes
default,auto_editandplan, set bygeneral.defaultApprovalMode; YOLO is available only from the command line (--yoloor--approval-mode=yolo). Folder trust is controlled bysecurity.folderTrust.enabled, with the list intrustedFolders.json. - Isolation: macOS Seatbelt (default profile
permissive-open, with restrictive and strict profiles), Docker or Podman containers (default imageghcr.io/google/gemini-cli:latest), a Windows native sandbox using integrity levels, gVisor (runsc) and experimental LXC on Linux. Enabled with--sandbox,GEMINI_SANDBOXor thetools.sandboxsetting. - Enforcement: system settings files at
/etc/gemini-cli/settings.json(Linux),C:\ProgramData\gemini-cli\settings.json(Windows) and/Library/Application Support/GeminiCli/settings.json(macOS), plus system defaults files.
OpenCode
- Approval model: rules with effects
allow,askanddenyover actions such asread,edit,shell,webfetch,external_directoryand<server>_<tool>for MCP tools; if no rule matches, OpenCode asks. The base policy allows all actions but asks before reading*.envfiles, andexternal_directoryis allowed by default. - Isolation: built-in agents carry their own policies:
build(default, full access),plan(denies edits except its plan folder and asks before shell commands) andexplore(limited to reads, search, shell and web tools). - Enforcement: rules go in a
permissionsarray inopencode.jsonc, with later rules overriding earlier ones. Central administration is not stated by Anomaly.
Configuration files and where they live
Instruction and configuration files are part of each agent's attack surface, because a cloned repository can carry them. See Coding Agent Configuration File Attacks and how to audit AI coding assistant tokens and config files.
| Tool | Project instructions | Permission or settings location | Enterprise-level file or channel |
|---|---|---|---|
| Amp | AGENTS.md | amp.permissions in Amp settings; VS Code command "Amp: Edit User Permissions" | Delegate helper (for example to Open Policy Agent); Enterprise MCP Registry Allowlist and Allowed Models |
| Claude Code | CLAUDE.md, or AGENTS.md where present | ~/.claude/settings.json and project settings | Managed settings, which outrank user settings |
| Codex CLI | AGENTS.md | Codex config file (config reference on the Codex docs) | Managed configuration and MDM requirements |
| Gemini CLI | GEMINI.md (configurable) | settings.json; trustedFolders.json | System settings and system defaults files per OS |
| OpenCode | AGENTS.md, then CLAUDE.md; global ~/.config/opencode/AGENTS.md | opencode.jsonc | Not stated by Anomaly |
Team, identity and admin controls
- Amp: SAML and OIDC SSO on Teams (a workspace needs at least one paid member); Enterprise adds SCIM sync, spend limits, audit logs and IP allowlisting. The manual lists Thread Visibility, Workspace Entitlements, Allowed Models and Minimal Data Retention among enterprise features, and the pricing page states a zero and minimal data retention policy for all users and workspaces.
- Claude Code: access through Team and Enterprise seats or an Anthropic Console account; managed settings set the default permission mode and can turn off auto and bypass modes for every session.
- Codex CLI: sign in with ChatGPT (Business, Enterprise and Edu workspaces) or an API key; managed configuration restricts approval policies, reviewers and web search modes. OpenTelemetry export is off by default.
- Gemini CLI: Google account sign-in with a Google Cloud project for Code Assist licences, Gemini API key or Vertex AI; system settings files fix configuration on managed machines;
privacy.usageStatisticsEnableddefaults to true. - OpenCode: per-provider sign-in with
/connect; configuration inopencode.jsoncat user and project level;opencode paircreates a one-time web connection link that expires in five minutes.
Retention and training-use terms for each provider are compared in the AI Coding Tools Data Retention Tracker; for a head-to-head of two of these tools, see Claude Code vs OpenAI Codex.
How to choose a CLI coding agent: factual criteria
These criteria help match a tool to a requirement. They are not a ranking.
| Requirement | What to check in each tool's documentation |
|---|---|
| Open-source licence required | Repository LICENSE file: Apache 2.0 (Codex CLI, Gemini CLI), MIT (OpenCode) |
| Existing subscription | Claude paid plans include Claude Code; ChatGPT Plus and above include Codex CLI; Gemini Code Assist Standard or Enterprise covers Gemini CLI |
| Choice of model provider | Provider list and bring-your-own-key routes: OpenCode connects many providers; Amp, Claude Code and Gemini CLI document API key or third-party provider routes; Codex CLI accepts an API key |
| Isolation for shell commands | Each tool's isolation documentation: Amp orbs and self-hosted runners; Claude Code Bash sandbox (macOS, Linux, WSL2); Codex CLI sandbox (macOS, Linux, Windows, WSL2); Gemini CLI sandboxes (macOS, containers, Windows, Linux); OpenCode per-agent permission policies |
| Central policy enforcement | Claude Code managed settings, Codex managed configuration, Gemini CLI system settings files, Amp delegate helper and Enterprise controls |
| SSO and SCIM | Plan pages for each provider; Amp lists SSO on Teams and SCIM on Enterprise |
For a structured evaluation with weighted criteria, see the AI Coding Assistant Buyer's Guide. For the browser-based app builders that sit beside these tools, see Vibe Coding Tools Compared, and for agent platforms beyond coding, AI Agent Platforms Compared.
Rolling out a CLI agent safely
- Pick the access route first: organisation plan, workspace sign-in or API key, so that usage sits under corporate identity rather than personal accounts.
- Set the starting permission level centrally: Claude Code
permissions.defaultMode, Codex managed approval policies, Gemini CLI system settings, Amp permission rules or delegate helper, OpenCodepermissionsrules. - Turn on the sandbox where documented: test builds and tests under the sandbox in a pilot group before wider use, and keep network access off unless a task needs named hosts.
- Review instruction and MCP files: treat AGENTS.md, CLAUDE.md, GEMINI.md and MCP server entries in cloned repositories as code that needs review.
- Measure: track the share of developers on the approved tool, the number of sessions run in the most permissive modes (
bypassPermissions,danger-full-access, YOLO), MCP servers in use against the allow-list, and credentials found in agent-readable files. - Roll back: each tool can be removed from a machine and its managed settings reverted; keep the previous approved tool configured until the pilot completes.
Credentials are the main identity concern for all five tools: an agent with shell access can read environment variables, cloud CLI sessions and token files. See AI Coding Tools and Secrets Sprawl and the AI IDE and Coding Agent Security Guide.
Practitioner checklist
- Record the date and plan whenever you quote a price or limit for any of the five tools.
- Confirm each tool's licence from its repository LICENSE file before approving it under an open-source policy.
- Choose one access route per tool that keeps usage under corporate identity.
- Set the default permission or approval mode centrally and block the most permissive mode outside isolated environments.
- Enable the documented OS sandbox for shell commands where the tool offers one, with network off by default.
- Review AGENTS.md, CLAUDE.md, GEMINI.md and MCP configuration in every repository the agent will open.
- Check Gemini CLI users' licence type: free and Google AI Pro or Ultra users moved to Antigravity CLI on 18 June 2026.
- Re-read each provider's documentation each quarter, since permission names and defaults change.
Standards and references
- Amp: Manual
- Amp: How we think about permissions
- Amp: Pricing
- Anthropic: Claude Code overview
- Anthropic: Claude Code permission modes
- Anthropic: Claude pricing
- Google: Gemini CLI repository
- Google: Gemini CLI sandboxing
- Google: Gemini CLI configuration reference
- Anomaly: OpenCode documentation
- Anomaly: OpenCode permissions
- Anomaly: OpenCode rules
- OpenAI: Codex CLI repository
- OpenAI: Codex agent approvals and security
- OpenAI: Codex pricing
Related NHI Mgmt Group resources: Claude Code guide · OpenAI Codex guide · Gemini CLI and Code Assist guide · AI Coding Tools Hub