What is Google Gemini CLI?
Google Gemini CLI is Google’s open-source command-line AI agent that embeds Gemini’s large language models directly into your terminal. Its powerful natural language processing allows you to code, debug, generate content, automate repetitive tasks, and even interact with external APIs and code repositories—all from the simplicity and speed of the command line.
Gemini CLI is:
Book a free, no-obligation strategy call and we'll map out your next move.
- Free to use with generous model request limits (60/min, 1,000/day).
- Cross-platform (Windows, Mac, Linux).
- Fully open-source and extensible, supporting plugins, context, and custom tools.
- Authentication-flexible: personal Google account or Gemini API key
Gemini CLI Commands Cheatsheet
Below is a distilled cheatsheet with the top Gemini CLI commands, flags, shortcuts, and developer workflows for 2025.
Installation & Launch
- Prerequisites: Node.js v18 or newer.
- Install globally:
npm install -g @google/gemini-cli - Run without install (npx):
npx @google/gemini-cli - Start interactive mode:
gemini
Authentication
Authenticate with a Google account or Gemini API key:
- Default (recommended):
Personal Google login (web popup on first run). - API key (for advanced/pro usage):
export GEMINI_API_KEY="YOUR_KEY"
Or add to~/.gemini/.envor project.gemini/.env.
Basic Usage Patterns
- Interactive REPL:
Launch terminal session.gemini - One-off completion:
gemini -p "Summarize this code" - Piping:
cat notes.txt | gemini - Model selection:
gemini --model gemini-1.5-flash - Debugging:
gemini --debug

