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 starts with three tools:

  • Codex CLI by OpenAI
  • Claude Code by Anthropic
  • Gemini CLI by Google
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 Gemini CLI and choose your auth method before API automation.
Want to compare themRead Codex vs Claude Code vs Gemini CLI after trying one small task.
  1. Choose one tool. Do not start with all three 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 CLI
Commandcodexclaudegemini
Installnpm or HomebrewNative installernpm, Homebrew, or npx
LoginChatGPT or OpenAI API keyClaude/Console or providerGoogle sign-in, API key, or Vertex AI
Instruction fileAGENTS.mdCLAUDE.mdGEMINI.md
Script modecodex execclaude -pgemini -p
MCPYesYesYes

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.

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.


Comments