A significantly improved fork of Google's Gemini CLI with better model persistence and usage transparency.
The original Gemini CLI has a major flaw: it gives up on the superior Gemini 2.5 Pro model too quickly and falls back to the much weaker Flash model at the first sign of trouble. This fork fixes that problem and adds essential usage tracking.
Problem: Original CLI switched to Flash model after just 2 rate limit errors and 2-second timeouts.
Solution: Made the CLI much more persistent in staying on Pro:
- 8 consecutive 429 errors needed before fallback (vs 2)
- 15 retry attempts instead of 5
- 10-second timeouts instead of 2 seconds
- 60-second max delays between retries
Result: CLI now tries for several minutes to stay on Pro instead of giving up after 15 seconds.
Problem: No visibility into API usage, leading to unexpected hits of the 100 calls/day limit.
Solution: Smart usage tracking with visual warnings:
- Real-time counter in footer:
gemini-2.5-pro [API Key] (42/100 calls)
- Color-coded warnings: Gray → Yellow (80%+) → Red (100%+)
- Only tracks billable usage (API Key/Vertex AI, not free OAuth)
- Resets daily automatically
Problem: Unclear which auth method is active, leading to unexpected billing.
Solution: Clear visual indicators:
- Red
[API Key]
= You're being billed - Green
[OAuth]
= Free usage - Green
[Vertex AI]
= Vertex AI billing
git clone https://github.com/agileandy/gemini-cli.git
cd gemini-cli
npm install
npm run build
npm start
- Get an API key from Google AI Studio
- Set your API key:
export GEMINI_API_KEY="your-api-key-here"
- Run:
gemini
- Interactive Chat with Gemini AI models
- File Context - automatically include relevant files
- Tool Integration - file operations, web search, shell commands
- MCP Server Support - extend with custom tools
- Memory System - persistent context across sessions
- Constant frustration with Flash model limitations
- Unexpected billing when thinking you're using OAuth
- Hitting 100-call limit without warning
- Premature fallback from Pro to Flash
- Stays on Pro model much longer - no more premature Flash fallbacks
- Always know your auth status - red for billed, green for free
- Never hit usage limits unexpectedly - clear counter with warnings
- Latest bug fixes - up to date with official releases
This fork is based on the official Google Gemini CLI v0.1.10, with significant improvements to model persistence and usage transparency.
Apache License 2.0 - see the LICENSE file for details.