Every major AI lab now ships a coding agent that lives in your terminal. What started as a niche experiment in 2023 is now the primary interface for agentic coding: you describe a task, the agent reads your repository, edits files, runs commands, and reports back. But the field has fragmented in an interesting way. Some agents are closed products tied to a single vendor’s models. Others are open-source harnesses that happily drive any LLM you point them at. One lab even retired its CLI and folded it into a bigger platform.
This guide covers ten of the most-known CLI agents: Claude Code, Codex CLI, Gemini CLI (and its successor Antigravity CLI), GitHub Copilot CLI, OpenCode, Aider, Pi, Grok Build, DeepSeek, and ZCode. We compare their technology stacks, recap their major releases — including the harness rewrites that reshaped them — walk through the commands each one speaks, both on the shell and inside a session, and finish with three reference tables: which instruction files each agent reads automatically, and how each one handles skills and plugins.
The Contenders and What They Are Built With
Implementation choices matter more than they first appear. The language a harness is written in affects startup time, sandboxing options, and how easy it is to install — and several vendors have rewritten their harnesses mid-flight for exactly these reasons.
- Claude Code — Anthropic’s agent, written in TypeScript and distributed as a native binary. Closed source, tied to Claude models by default but configurable against Anthropic-compatible endpoints.
- Codex CLI — OpenAI’s agent. Started life as a TypeScript tool, then was rewritten in Rust to get zero-dependency installs, faster startup, and stronger native sandboxing.
- Gemini CLI / Antigravity CLI — Google’s open-source agent, written in TypeScript on Node.js. In 2026 it was transitioned into the Antigravity platform, whose CLI is built in Go.
- GitHub Copilot CLI — GitHub’s terminal agent, closed source and installed via npm. Its differentiator is GitHub-native context: issues, pull requests, and repos are first-class inputs.
- OpenCode — an open-source, provider-agnostic agent in TypeScript, built around a client/server architecture so the TUI, web UI, and automation all talk to the same backend.
- Aider — the veteran of the group: a Python pair-programming tool, deeply git-native, that works with virtually any LLM and commits every change it makes.
- Pi — a deliberately minimal open-source harness in TypeScript. No built-in subagents or plan mode; instead it bets on extensions, skills, and a tiny system prompt.
- Grok Build — xAI’s terminal-native coding agent for Grok models, currently in beta, with a mouse-interactive TUI and headless mode.
- DeepSeek — a special case: DeepSeek ships models, not a harness. Its official story is pointing other agents (Claude Code, OpenCode, OpenClaw) at its Anthropic-compatible API.
- ZCode — Z.ai’s agent harness tuned for its GLM models. It is desktop-first (an Agentic Development Environment) with remote and bot-channel access, sold alongside the GLM Coding Plan.
Major Releases Recap
Each agent has one or two releases that defined what it is today. Two of them involved full harness rewrites, which is worth calling out: OpenAI rebuilt Codex CLI from scratch mid-2025, and Google retired Gemini CLI in favor of a new Go-based Antigravity CLI in 2026.
- Claude Code 2.0 (September 2025) — the release that made it production-grade: checkpoints you can roll back to, subagents running in isolated context windows, hooks, background tasks, a refreshed terminal UI, and searchable prompt history. The later 2.x line added plugins, an interactive plan mode, and the agent view for dispatching parallel background sessions.
- Codex CLI — the Rust rewrite (mid-2025) — the defining moment in its history. The original TypeScript harness was replaced with a Rust implementation for performance, security sandboxing, and a zero-dependency install. The GPT-5-Codex model release followed in September 2025, and the 0.1xx series added enterprise features such as custom CA support, a hooks system, CI-friendly sandboxing, and a Python SDK.
- Gemini CLI 1.0 (2025) — Google’s open-source agent arrived with a genuinely generous free tier (60 requests per minute, 1,000 per day with a personal account), a 1M-token context window, and built-in Google Search grounding. Its weekly release cadence and 100k+ GitHub stars made it the default open option. The harness rewrite: in May 2026 Google announced the transition to Antigravity CLI, built in Go on a shared server-side agent harness; from June 18, 2026, Gemini CLI stopped serving free and consumer-tier requests. Skills, hooks, subagents, and extensions carried over (extensions became plugins).
- GitHub Copilot CLI public preview (September 2025) — brought the Copilot coding agent to the terminal with GitHub context built in. October 2025 added custom agents and task delegation, and later updates brought Agent HQ, richer context management, and automatic updates.
- OpenCode v2 (2026) — a major generational jump for the open-source agent: a client/server backend so any interface can attach to the same session, per-agent permission configuration, and first-class GitHub automation via a GitHub Actions agent. Its provider-agnostic credentials model (powered by the models.dev registry) is the core design decision that sets it apart.
- Aider — the long game (2023–today) — no single big-bang release; instead a steady stream: the repo map for codebase awareness beyond context windows, architect/editor mode, git-anchored auto-commits with undo, and continuous support for the newest models. It remains the reference point every newer agent gets compared against.
- Pi 1.0 (late 2025) — born from the “I hated every coding agent” school of thought: a minimal harness with tree-structured shareable sessions, mid-run steering, four operating modes (interactive, print/JSON, RPC, SDK), and an extension system where the agent can customize the harness itself. Now developed under Earendil Works.
- Grok Build beta (2026) — xAI’s entry, powered by Grok 4.7: a terminal-native TUI, headless mode with streaming JSON output for scripts, custom models via a TOML config, and a skills/plugins/marketplace system.
- DeepSeek — model-first strategy (2025–2026) — rather than shipping its own CLI, DeepSeek published an Anthropic-compatible API endpoint and official guides to drive Claude Code, OpenCode, and OpenClaw with DeepSeek models. Your harness stays, the brain swaps.
- ZCode for GLM-5.3 (2026) — positioned as an Agentic Development Environment: Goal Mode for long-horizon tasks, browser automation, repo wiki, memory, automations, idle-time tasks, remote control from mobile, and subagents/skills/hooks/MCP — tightly tuned to GLM’s 1M-token context.
Feature Comparison
| Agent | Open Source | Stack | Models | Headless / Scripting | Subagents | Skills | MCP |
|---|---|---|---|---|---|---|---|
| Claude Code | No | TypeScript / native binary | Claude (Anthropic-compatible APIs possible) | Yes, print mode and SDK | Yes | Yes | Yes |
| Codex CLI | Yes (Apache-2.0) | Rust | OpenAI (custom providers configurable) | Yes, codex exec | Yes | Yes | Yes |
| Antigravity CLI (ex-Gemini CLI) | Gemini CLI was; Antigravity is closed | Gemini: TypeScript; Antigravity: Go | Gemini family | Yes, non-interactive mode | Yes | Yes | Yes |
| GitHub Copilot CLI | No | Closed source, npm-distributed | Claude, GPT, Gemini via Copilot plans | Yes, prompt mode | Yes (custom agents) | Yes | Yes |
| OpenCode | Yes | TypeScript, client/server | 75+ providers via models.dev | Yes, run and serve modes | Yes | Yes | Yes |
| Aider | Yes (Apache-2.0) | Python | Almost any LLM, local or cloud | Yes, –message flag | No (by design) | No | No |
| Pi | Yes (MIT) | TypeScript / Node.js | 15+ providers, mid-session switching | Yes, print/JSON, RPC, SDK | No (extensions can add) | Yes | Yes |
| Grok Build | No | Native binary, TUI-first | Grok (custom models via config) | Yes, -p with streaming JSON | Yes | Yes | Yes |
| DeepSeek | n/a — models only | n/a | DeepSeek via Anthropic-compatible API | Depends on host harness | Depends on host harness | Depends on host harness | Depends on host harness |
| ZCode | No | Desktop ADE + CLI + remote | GLM family (tuned for GLM-5.3) | Automations and idle-time tasks | Yes | Yes | Yes |
Command Cheat Sheet
Every agent below launches its interactive TUI when run bare. The interesting differences show up in the flags and subcommands, so here is the working vocabulary for each one.
Claude Code
| Command | What it does |
|---|---|
| claude | Starts an interactive session in the current directory. |
| claude “query” | Starts a session with an initial prompt. |
| claude -p “query” | Runs one prompt non-interactively (print mode) and exits — the building block for scripts and pipes. |
| claude -c | Continues the most recent conversation in this directory. |
| claude -r “session-id” | Resumes a named or ID’d past session. |
| claude agents | Opens the agent view to monitor and dispatch parallel background sessions. |
| claude mcp add | Registers an MCP server for the project or user scope. |
| claude update / claude install | Updates the CLI, or installs a specific native binary version. |
Inside a session, the daily slash commands: /init generates a starter CLAUDE.md, /memory edits it, /plan switches to plan mode before a large change, /model and /effort adjust the model and reasoning depth, /context shows what is filling the window and /compact summarizes it free, /tasks lists background subagents, /diff and /code-review inspect and review changes before shipping, /rewind rolls code and conversation back to a checkpoint, /resume, /branch and /fork revisit or duplicate earlier sessions, /permissions sets approval rules, and /doctor diagnoses a broken setup.
Codex CLI
| Command | What it does |
|---|---|
| codex | Starts the interactive TUI in the current repo. |
| codex exec “task” | Runs a task headlessly — the standard form for CI and automation. |
| codex resume | Picks a previous session and continues it. |
| codex mcp | Manages MCP servers Codex can call. |
| codex –model <name> | Selects the model and reasoning effort for the session. |
| /init | In-session: creates an AGENTS.md with project instructions. |
| /review | In-session: reviews the current diff and reports issues. |
| /permissions | In-session: chooses what Codex is allowed to do without asking. |
| /diff | In-session: shows the working-tree changes Codex has made. |
| /plan | In-session: switches to plan mode so Codex proposes an approach before editing. |
| /goal | In-session: sets a persistent task goal that survives a long-running task. |
| /mention | In-session: attaches a specific file or folder to the chat. |
| /status, /usage | In-session: shows session configuration, token use, and remaining context. |
| /new, /fork | In-session: starts a fresh chat, or branches the current one to try another approach. |
Gemini CLI / Antigravity CLI
| Command | What it does |
|---|---|
| gemini | Starts the interactive TUI. |
| gemini -p “prompt” | Runs one prompt non-interactively and prints the result. |
| /memory add | In-session: saves a fact to GEMINI.md so it persists across sessions. |
| /chat save & /chat resume | In-session: snapshots and restores conversations by tag. |
| /mcp | In-session: lists MCP servers and their tools. |
| gemini extensions install | Installs an extension from the extension ecosystem. |
| /skills reload | In-session: reloads discovered Agent Skills from disk. |
| /memory show, /memory refresh | In-session: displays or reloads the merged GEMINI.md instruction context. |
| /chat save <tag> | In-session: checkpoints the conversation so /chat resume can restore it later. |
| /stats | In-session: shows session token usage and savings from caching. |
For the Antigravity CLI, the workflow is the same shape — interactive TUI, non-interactive runs, skills, hooks, and plugins — with asynchronous multi-agent orchestration added on top.
GitHub Copilot CLI
| Command | What it does |
|---|---|
| copilot | Starts the interactive agent session. |
| copilot –prompt “task” | Runs a single task and exits — suited for scripts. |
| copilot –model <name> | Picks the underlying model (Claude, GPT, or Gemini, per your plan). |
| /mcp | In-session: manages MCP server connections. |
| @github | In-session: brings GitHub context (issues, PRs, repos) into the conversation. |
| /instructions | In-session: lists the instruction files discovered for this session; you can toggle each one off. |
| /cwd | In-session: shows or changes the working directory the agent operates in. |
| /clear | In-session: clears session history to start a new task. |
| copilot init | Shell: initializes custom instructions for the repository. |
| copilot skill / copilot plugin | Shell: manages skills and plugins non-interactively (list, add, enable, disable). |
OpenCode
| Command | What it does |
|---|---|
| opencode | Starts the TUI for the current project. |
| opencode run “prompt” | Runs a prompt non-interactively. |
| opencode serve | Starts the backend server that TUI, web, and mobile clients attach to. |
| opencode attach <url> | Attaches this terminal’s TUI to a running remote backend. |
| opencode auth login | Configures API keys for any provider in the models.dev registry. |
| opencode agent create | Walks you through creating a custom agent with its own permissions. |
| opencode github install | Installs the GitHub Actions agent into your repository. |
| opencode mcp add | Adds an MCP server to the configuration. |
| /init | In-session: scans the repo and creates or improves AGENTS.md with project guidance. |
| /connect | In-session: connects a provider interactively (e.g. type deepseek, paste the key, pick a model). |
| /models | In-session: switches the model for the current session from the loaded provider list. |
Aider
| Command | What it does |
|---|---|
| aider | Starts a session; use aider –model <name> to pick the LLM. |
| /add <file> | Adds files to the chat so edits can be made to them. |
| /drop <file> | Removes files from the session context. |
| /architect “change” | Proposes a change, then asks you to accept before editing. |
| /ask “question” | Questions the codebase without editing anything. |
| /run <cmd> | Runs a shell command and feeds the output back to the model. |
| /diff | Shows the changes since the last message. |
| /undo | Reverts the last AI commit using git. |
| /read <file> | Adds a file as read-only context — the way Aider loads AGENTS.md or CONVENTIONS.md. |
| /map | Prints the repository map Aider builds so the model can navigate beyond the context window. |
Pi
| Command | What it does |
|---|---|
| pi | Starts the interactive TUI. |
| pi -p “query” | Print mode: one query, result to stdout, exit. |
| pi –mode json | Emits the session as a JSON event stream for tooling. |
| /model | In-session: switches models mid-conversation (Ctrl+L). |
| /tree | In-session: navigates the tree-structured session history and branches from any point. |
| /export / /share | In-session: exports the session to HTML or uploads it to a gist for a shareable URL. |
| /reload | In-session: reloads extensions, skills, templates, themes, and context files. |
| /new, /resume, /fork | In-session: starts a new session, switches to a saved one, or branches from an earlier message. |
| /compact [instructions] | In-session: compacts the context, optionally telling Pi how to summarize. |
| /skill:name | In-session: force-loads a skill that the model did not trigger on its own. |
Grok Build
| Command | What it does |
|---|---|
| grok | Starts the interactive fullscreen TUI; opens a browser for auth on first launch. |
| grok -p “query” | Runs headlessly — one prompt, result to stdout. |
| grok -p “query” –output-format streaming-json | Headless run with a streaming JSON event stream for integrations. |
| grok inspect | Shows what Grok discovered: config sources, instructions, skills, plugins, hooks, MCP servers. |
| /model <name> | In-session: switches model, including custom ones from ~/.grok/config.toml. |
| /plugins, /skills, /mcps, /hooks | In-session: all open the same extensions modal to manage plugins, skills, MCP servers, and hooks. |
| /hooks-trust | In-session: grants trust to project-level hooks before they are allowed to run. |
DeepSeek
DeepSeek has no CLI of its own — you configure an existing harness to use its Anthropic-compatible endpoint. With Claude Code, for example, you export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic, set ANTHROPIC_AUTH_TOKEN to your DeepSeek API key, point ANTHROPIC_MODEL at a DeepSeek model, and then run claude as usual. The same pattern works for OpenCode (via its /connect provider flow) and OpenClaw. In other words, the DeepSeek “commands” are the commands of whichever harness you plug it into.
ZCode
ZCode is desktop-first: you install the app, sign in with a Z.ai account or GLM Coding Plan subscription, and work through the ZCode Agent UI. Long-running tasks continue in the background and can be followed from the mobile Remote or a Feishu/WeChat bot channel, with safety confirmation before sensitive commands run. The in-session vocabulary is compact: /goal shows, sets, pauses, or clears the session goal that drives long-running tasks, /compact condenses the conversation while preserving key context, and $ or the command panel invokes skills. Most of its distinctive capability — Goal Mode, browser automation, repo wiki, memory, idle-time tasks — lives in the workspace model rather than in terminal flags.
Which Instruction Files Are Read Automatically
Every agent needs standing instructions: build commands, conventions, architecture notes. The industry has converged on AGENTS.md as the portable standard, but each tool arrived there by a different road, and what they read by default still differs. This is the single most confusing part of switching agents, so here is the map.
| Agent | Native file | Reads AGENTS.md? | Also reads | Discovery behavior |
|---|---|---|---|---|
| Claude Code | CLAUDE.md | Yes (v2.1.277+) | CLAUDE.local.md, .claude/rules/ | Project, user (~/.claude/CLAUDE.md), and org-managed levels; AGENTS.md is read only when no CLAUDE.md exists in the working directory or above it |
| Codex CLI | AGENTS.md | Yes — it is the standard’s flagship user | Nested AGENTS.md per subdirectory | Walks up from the working directory to the project root (a directory containing .git by default); the closest AGENTS.md to the edited file wins on conflict |
| Gemini / Antigravity CLI | GEMINI.md | Yes, via config | @-imports inside context files | Global, project, and subdirectory hierarchy; switching the filename to AGENTS.md is one line in .gemini/settings.json |
| GitHub Copilot CLI | .github/copilot-instructions.md | Yes | CLAUDE.md, GEMINI.md, *.instructions.md | Combines all discovered files (repo root, cwd, intermediates, nested dirs); path-specific .instructions.md files apply only to matching globs; /instructions lists and toggles them |
| OpenCode | AGENTS.md | Yes — native | CLAUDE.md as fallback, custom instructions array (glob or URL) | First match wins: AGENTS.md beats CLAUDE.md at the same level; global file at ~/.config/opencode/AGENTS.md |
| Aider | none — opt-in | Not automatically | Any file via –read or /read | Deliberately explicit: point it at AGENTS.md or CONVENTIONS.md in .aider.conf.yml with read: AGENTS.md |
| Pi | AGENTS.md | Yes — native | SYSTEM.md (replaces or appends the system prompt) | Loaded from ~/.pi/agent/, parent directories, and the current directory |
| Grok Build | AGENTS.md family | Yes — native | CLAUDE.md, CLAUDE.local.md, .claude/rules/ | Reads AGENTS.md/Agent.md walked from cwd to repo root, and auto-reads Claude Code instruction files with zero configuration |
| DeepSeek | depends on host | Whatever the host reads | — | No harness of its own: instruction handling belongs to the agent you plug it into |
| ZCode | AGENTS.md | Yes — native | CLAUDE.md (one-time onboarding migration only) | Reads exactly two files: ~/.zcode/AGENTS.md (global, injected first) and workspace AGENTS.md; no multi-level merging or child-directory scans |
The practical takeaway: an AGENTS.md in your repo root now serves Codex, Copilot, OpenCode, Pi, Grok, and ZCode out of the box, works with Claude Code when no CLAUDE.md competes, and can be adopted by Gemini with one settings line. Aider is the only holdout, and it wants to be told explicitly.
How Each Agent Handles Skills
Skills are the middle ground between a prompt and a plugin: a folder with a SKILL.md file (name plus description in frontmatter, instructions in the body, optional scripts) that the agent loads on demand. The format came out of Claude Code’s Agent Skills standard and has spread to nearly everyone — but the discovery paths and invocation styles vary.
- Claude Code — the reference implementation. Skills live at the user, project, or plugin level; progressive disclosure keeps only name and description in context until invoked. Bundled skills like /verify ship with the CLI, and up to six skills can be chained in one command.
- Codex CLI — follows the same open standard with /skills or a $ mention to invoke. Codex caps the initial skill list at roughly 2% of the context window (8,000 characters when the window size is unknown), shortening descriptions first, so huge skill collections degrade gracefully instead of crowding out your code.
- Gemini / Antigravity CLI — discovers skills from ~/.gemini/skills/ and .gemini/skills/ (the ~/.agents/skills/ alias also works), manages them with /skills reload, and carries them into Antigravity CLI as a first-class feature.
- GitHub Copilot CLI — skills are manageable non-interactively (copilot skill list/add/enable/disable) or in-session, and they coexist with custom agents and dynamic workflows.
- OpenCode — reads the Agent Skills format, and as a migration courtesy also loads ~/.claude/skills/ unless disabled with an environment variable.
- Aider — no skill system. Its equivalent is convention files loaded via /read, plus the repo map. Simplicity is the feature.
- Pi — skills load progressively (name, description, and path in the system prompt; full instructions only when relevant) and are force-loadable with /skill:name. Skills ship as part of packages alongside extensions, prompt templates, and themes.
- Grok Build — discovers skills from project and user .grok/skills/ directories, enabled plugins, and extra config paths; user-invocable ones appear as slash commands automatically.
- DeepSeek — nothing of its own; skills belong to the host harness.
- ZCode — skills live in ~/.zcode/skills/ with the standard SKILL.md format, are toggled in Settings, and share a fixed metadata budget per turn: install too many and descriptions drop to names, hurting automatic triggering.
How Each Agent Handles Plugins
Plugins bundle skills, commands, subagents, hooks, and MCP servers into one installable unit, usually distributed through a marketplace. Only part of the field has them; the rest extend in other ways.
- Claude Code — the fullest implementation: /plugin opens a marketplace browser (the Discover tab), and a plugin is a directory of skills, agents, hooks, and MCP servers loaded as one unit. ZCode even preloads the Claude Code marketplace as a compatibility source.
- Codex CLI — plugins are the distribution channel for skills shared with the wider ChatGPT ecosystem: a universal plugin directory spans ChatGPT web, desktop, and mobile plus Codex CLI and the IDE extension. You author a skill, then package it as a plugin when you want others to install it.
- Gemini / Antigravity CLI — Gemini CLI had a mature extensions system (gemini extensions install, a public extension gallery); Antigravity carried it forward renamed as plugins.
- GitHub Copilot CLI — full plugin lifecycle on the shell: copilot plugin install/uninstall/enable/disable plus marketplace registration, and in-session management through the extensions interface.
- OpenCode — extends through plugins configured in opencode.json and its GitHub Actions agent, plus the models.dev provider registry; there is no consumer marketplace, which fits its config-as-code philosophy.
- Aider — no plugins at all. Extensibility means YAML config, convention files, and scripting around the CLI.
- Pi — the outlier worth studying: instead of plugins, Pi packages. pi install npm:…, git:…, or a local path installs extensions, skills, prompt templates, and themes as one versioned unit, and extensions can modify the harness itself — a more radical, code-first take on the same idea.
- Grok Build — plugins add skills, agents, hooks, MCP, and LSP servers, discovered from project/user directories or marketplaces, and it reads Claude Code marketplaces directly for zero-config compatibility.
- DeepSeek — none; whatever the host harness supports.
- ZCode — a plugin store with a public catalog plus personal marketplaces (GitHub repos, git URLs, local folders). One plugin can bundle skills, commands, subagents, MCP servers, and hooks, enabled or disabled as a unit per workspace.
Which One Should You Use?
If you want the most polished end-to-end experience and already pay for the models, Claude Code is the safe default: checkpoints, subagents, and hooks make it genuinely production-ready. If you live in GitHub, Copilot CLI’s native issue and PR context is hard to beat. If open source and provider freedom matter, OpenCode is the strongest all-rounder, Pi is the best minimal harness to bend to your will, and Aider remains unbeatable for small, git-disciplined, model-agnostic edits. Codex CLI is the pick for OpenAI-centric shops that want a native, sandboxed binary for CI. Grok Build is worth a look for xAI customers. ZCode makes sense if the GLM Coding Plan’s pricing appeals and you prefer a desktop agent environment. And DeepSeek’s lesson generalizes: with Anthropic-compatible endpoints everywhere, the harness and the model are now separable decisions — pick them independently.
Wrapping Up
The CLI agent market has matured fast. Two harness rewrites in two years — Codex CLI’s move to Rust and Gemini CLI’s absorption into Antigravity — signal that vendors consider the harness itself a competitive surface, not just the model behind it. Meanwhile the open-source camp (OpenCode, Aider, Pi) proves the harness can be a commodity: swappable providers, scriptable modes, and enough extensibility to build your own workflow. Whichever you choose, the command tables above should get you productive in the first ten minutes.