You will need to install Node and then install Gemini CLI. Instructions below for Windows, Linux, and Mac:
Windows
- Prerequisites
- Windows 10 (21H2+) or Windows 11
- PowerShell 5.1+ or Windows Terminal
- Node.js ≥18 LTS and npm ≥9
- Admin rights (for global installs) reddit.com+12gemini-cli.blog+12medium.com+12
- Install Options
- Quick trial (no install):
powershell
CopyEdit
npx https://github.com/google-gemini/gemini-cli
- Global install (recommended):
powershell
CopyEdit
npm install -g @google/gemini-cli
gemini --version
- Via winget:
powershell
CopyEdit
winget install OpenJS.NodeJS.LTS --silent
npm install -g @google/gemini-cli
- Via Chocolatey:
powershell
CopyEdit
choco install nodejs-lts -y
elevate npm install -g @google/gemini-cli
``` :contentReference[oaicite:8]{index=8}
- Authenticate & First Run
- Run
gemini, choose “Login with Google” (free tier gives 60 requests/min and 1,000/day) - Complete OAuth flow in browser aiyu-ayaan.github.io+4gemini-cli.blog+4arstechnica.com+4
- Optionally set
GEMINI_API_KEYfor higher quotas:
powershell
CopyEdit
setx GEMINI_API_KEY "YOUR_KEY_HERE" /m
``` :contentReference[oaicite:14]{index=14}
Linux (Ubuntu / Debian / others)
- Prerequisites
- Modern distro (Ubuntu 20.04+, Debian 10+)
- Node.js ≥18 LTS and npm apidog.commedium.com+1gemini-cli.blog+1
- Install
- Global install via npm:
bash
CopyEdit
sudo npm install -g @google/gemini-cli
- Or quick trial via npx:
bash
CopyEdit
npx https://github.com/google-gemini/gemini-cli
``` :contentReference[oaicite:20]{index=20}
- Ubuntu Snap Desktop!
Want a GUI? Install Gemini Desktop (unofficial):
bash
CopyEdit
sudo snap install gemini-desktop
sudo snap connect gemini-desktop:audio-record
``` :contentReference[oaicite:23]{index=23}
- Authenticate
- Run
geminiand sign in (Google account free tier) - Or set
GEMINI_API_KEYvia:
bash
CopyEdit
export GEMINI_API_KEY="YOUR_KEY_HERE"
``` :contentReference[oaicite:26]{index=26}
macOS
- Prerequisites
- macOS 12+
- Node.js ≥18 LTS with npm medium.com+1gemini-cli.blog+1
- Install
- Via Homebrew (if available):
bash
CopyEdit
brew install gemini-cli
(Some unofficial guide references support; otherwise use npm)
- Or via npm globally:
bash
CopyEdit
npm install -g @google/gemini-cli
- Or quick test with npx:
bash
CopyEdit
npx https://github.com/google-gemini/gemini-cli
``` :contentReference[oaicite:33]{index=33}
- Authenticate
gemini→ sign in with Google → free tier- Or export your API key:
bash
CopyEdit
export GEMINI_API_KEY="YOUR_KEY_HERE"
``` :contentReference[oaicite:36]{index=36}
Post‑Install Quickstart (All Platforms)
bash
CopyEdit
gemini "Explain quantum computing in simple terms"
gemini --prompt "Translate 'hello' to Spanish"
gemini --file path/to/code.js "Review this code for bugs"
- For multimodal use, e.g., with screenshots/PDFs:
bash
CopyEdit
gemini --image screenshot.png "Describe this UI mockup"
``` :contentReference[oaicite:38]{index=38}
Additional Resources
- Official Google announcement: “Gemini CLI: your open‑source AI agent” (Jun 25 2025) indiatimes.com+5blog.google+5gemini-cli.blog+5
- Community & advanced usage guide (unofficial): npm-based install and multimodal workflows
Summary Table
| Platform | Install Method | Auth Options |
|---|---|---|
| Windows | npm / npx / winget / choco | Google sign‑in or GEMINI_API_KEY |
| Linux | npm / npx (+ optional Snap GUI) | sign‑in or GEMINI_API_KEY |
| macOS | Homebrew / npm / npx | sign‑in or GEMINI_API_KEY |