OfficialGemini / GoogleGoogle
Gemini CLI
Google's official terminal agent.
The quickest path is an API key from Google AI Studio set as GEMINI_API_KEY. You can also just launch it and log in with your Google account for the free tier.
Setup steps
- 1
Install the CLI
Requires Node.js 20 or newer. Installs the global gemini command.
bashnpm install -g @google/gemini-cli - 2
Get an API key
Create a free key in Google AI Studio and copy it.
texthttps://aistudio.google.com/apikey - 3
Set the key
Store it in the GEMINI_API_KEY environment variable. Add it to your shell profile to keep it across sessions.
bash / zshexport GEMINI_API_KEY="your-api-key"PowerShellsetx GEMINI_API_KEY "your-api-key" - 4
Start coding
Run it inside your project folder to chat, read and edit code.
bashgemini
Tip: No key needed to try it: run gemini and sign in with a Google account. For higher limits and API billing, use a GEMINI_API_KEY.
Pick a cheaper model or provider first, then plug its key and endpoint into the steps above. Compare prices · Browse providers