Gemini CLI (gemini)¶
Gemini CLI is Google's agentic coding CLI, backed by Gemini models.
Install¶
npm install -g @google/gemini-cli
Authenticate¶
gemini auth
Or set an API key directly:
export GEMINI_API_KEY=...
Configure in millstone¶
[millstone]
cli = "gemini"
Or target a specific role:
[millstone]
cli = "claude"
cli_analyzer = "gemini"
Notes¶
- millstone invokes
gemini -y -o json <prompt>, which runs Gemini CLI non-interactively (-yskips confirmations) and requests JSON-formatted output for safer parsing. - Gemini CLI has a free tier with per-minute rate limits. millstone automatically retries on
model_capacity_exhausted,resource_exhausted(429), andservice_unavailable(503) errors, with exponential backoff up to 4 attempts. - Structured output appends a JSON schema instruction to the prompt, since Gemini CLI does not natively support
--json-schema.