Skip to main content

Gemini CLI

Google’s open-source CLI for the Gemini model family. Significantly more capable than early wiki assessments suggested — has native equivalents for most CC features. Install: npm install -g @google/gemini-cli

Feature Parity with Claude Code


Context System: GEMINI.md

Hierarchical instruction loading:
  1. ~/.gemini/GEMINI.md — global, all sessions
  2. Project-root GEMINI.md — workspace scope
  3. Subdirectory GEMINI.md — JIT loaded when agent navigates into dir
Supports @file.md imports (relative paths). /memory add <text> appends to global file. context.fileName in settings.json can be configured to also read ["AGENTS.md", "GEMINI.md"], making Gemini natively read AGENTS.md files.

Custom Commands: TOML Format

.toml files in .gemini/commands/ (project) or ~/.gemini/commands/ (global).
Syntax features:
  • {{args}} — user arguments injected into prompt (raw outside !{}, shell-escaped inside)
  • !{command} — shell command executed, output injected; security confirmation required
  • @{path/to/file} — file content injected into prompt (processed before !{})
  • Namespacing: .gemini/commands/git/commit.toml/git:commit
  • MCP prompts also appear as slash commands

Skills: activate_skill Tool

Gemini has a native skill system via the activate_skill tool. Skills live in .gemini/skills/ directory. When triggered, Gemini loads the skill’s instructions into context (same progressive disclosure principle as CC).
Key difference from CC: Gemini uses activate_skill as a native tool; CC uses the Skill meta-tool with isMeta: true message injection.

Built-in Tool Set

Full list from official docs: Shell shorthand: !command runs run_shell_command. @path triggers read_many_files.

Migration Mapping (CC → Gemini)