Skip to content

AI Coding Tool Selection

This course uses Claude Code as the primary recommended tool, but most labs can also be completed with the alternative tools listed below.

ItemClaude CodeGemini CLICodex CLIOpenCode
VendorAnthropicGoogleOpenAICommunity (open-source)
Installpnpm add -g @anthropic-ai/claude-codepnpm add -g @google/gemini-clipnpm add -g @openai/codexbrew install opencode
Runclaude "prompt"gemini (interactive)codex "prompt"opencode (TUI)
Headlessclaude --print --no-colorpipe supportcodex --approval-mode full-autoopencode serve (API)
MCP SupportFullSupportedNot supportedLimited
Project Instruction FileCLAUDE.mdGEMINI.mdAGENTS.md
Context Window200K1M192KModel-dependent
CostAPI key requiredFree (1,000 req/day)ChatGPT Plus or API keyFree (local models available)
SandboxNoneNoneYes (safest)None
Terminal window
pnpm add -g @anthropic-ai/claude-code
claude --version
Terminal window
# Anthropic API key (https://console.anthropic.com)
export ANTHROPIC_API_KEY="sk-ant-..."

When running a CLI non-interactively inside a Ralph Loop, the commands differ by tool.

Terminal window
claude --print --no-color --dangerously-skip-permissions "$(cat PROMPT.md)"

Each tool reads a specific file in the project root to pass project-specific instructions to the agent.

ToolFileLocation
Claude CodeCLAUDE.mdProject root
Gemini CLIGEMINI.mdProject root
Codex CLIAGENTS.mdProject root
OpenCodeNo dedicated file

Tool Abstraction via Environment Variables

Section titled “Tool Abstraction via Environment Variables”

When writing scripts that need to support multiple tools, you can use an environment variable pattern.

Terminal window
# Select tool via environment variable
export AI_CLI="${AI_CLI:-claude}" # default: claude
# Example usage in harness.sh
case "$AI_CLI" in
claude)
claude --print --no-color --dangerously-skip-permissions "$(cat PROMPT.md)" ;;
gemini)
cat PROMPT.md | gemini ;;
codex)
codex --approval-mode full-auto "$(cat PROMPT.md)" ;;
*)
echo "Unsupported tool: $AI_CLI" && exit 1 ;;
esac