Skip to content

AI CLIs: getting started

Beginner 15 min

AI CLIs are terminal tools that act as local coding agents. They can read your project, propose changes, write files, and run commands. That makes them useful, but also worth starting with carefully.

This section covers four tools:

  • Codex CLI by OpenAI
  • Claude Code by Anthropic
  • Gemini CLI by Google
  • Antigravity CLI (agy) by Google — the successor to Gemini CLI
If you…Do this first
Have never used an AI CLIRead this page, start in a test repository, and ask the tool to explain the project without changes.
Already use ChatGPT/CodexStart with Codex CLI and run a local /review after the first change.
Already use ClaudeStart with Claude Code and create a short CLAUDE.md.
Already use Google/GeminiStart with Antigravity CLI (agy) — Gemini CLI’s free access shuts down June 18, 2026.
Want to compare themRead Codex vs Claude Code vs Gemini CLI vs agy after trying one small task.
  1. Choose one tool. Do not start with all four at once.
  2. Use a real Git repository, preferably one where mistakes are cheap.
  3. Run git status, so you know what is already changed.
  4. Ask the CLI to explain the project without running commands.
  5. Let it propose test/build commands.
  6. Approve one small change.
  7. Run build/test and review the diff.
TermMeaning
WorkspaceThe folder the agent works from. Use the concrete project root.
SandboxTechnical limits on what commands can read, write, and access over the network.
ApprovalThe prompt where you approve a command, file edit, or other action.
Instruction fileAGENTS.md, CLAUDE.md, or GEMINI.md, used for stable project rules.
ContextEverything the agent receives: prompt, files, instructions, logs, MCP data, and prior conversation. More context can help, but costs more.
TopicCodex CLIClaude CodeGemini CLIAntigravity CLI (agy)
Commandcodexclaudegeminiagy
Installnpm or HomebrewNative installernpm, Homebrew, or npxOfficial install script
LoginChatGPT or OpenAI API keyClaude/Console or providerGoogle sign-in, API key, or Vertex AIGoogle sign-in
Instruction fileAGENTS.mdCLAUDE.mdGEMINI.md.md rule files (auto-discovery)
Script modecodex execclaude -pgemini -pagy -p
MCPYesYesYesYes

Start with Codex CLI

Good if you already use OpenAI, ChatGPT, Codex, AGENTS.md, code review, and local repositories.

Start with Claude Code

Good if you want strong conversation workflows, project memory, and clear permissions.

Start with Gemini CLI

Good if you want an open source terminal agent with Google sign-in or a Gemini API key. Note: the free Google sign-in access shuts down on June 18, 2026 — after that a paid Gemini API key or Code Assist Standard/Enterprise is required.

Start with Antigravity CLI (agy)

Good if you have a Google account and want a fast, lightweight agent. agy is Google’s successor to Gemini CLI — a single binary with Google sign-in and MCP support.

Before you start:

  1. Open a real Git repository.
  2. Run git status.
  3. Create a commit or branch if needed.
  4. Start your AI CLI.
  5. Ask it to read and explain first, not edit.

Good first prompt:

Explain this project from the repository files. Do not make changes.
Tell me which test or build commands you would run, but do not run them yet.

Last checked: April 11, 2026.