Gemini CLI
Gemini CLI
On this page
Step 1: System Requirements
Node.js v18+ is required. Check with:
node -v


If not installed, download from nodejs.org
Step 2: Install Gemini CLI
You have two options:
Option A: Run without installing (quick try)
On command line execute:
npx https://github.com/google-gemini/gemini-cli

Good for quick tests.
Option B: Global install (recommended for regular use)
On command line execute:
npm install -g @google/gemini-cli

Then ensure the gemini command works:
gemini --help

Step 3: Launch and Authenticate
Run on command line:
gemini

On first run:
- Pick a theme (color style in your terminal)
- Choose authentication:
Google Login: Sign in via your web browser to use the free tier (60 requests/min, 1000/day).
API Key: Obtain one from Google AI Studio, then export and set:
On Windows:
setx GEMINI_API_KEY "YOUR_API_KEY_HERE"
On MAC:
export GEMINI_API_KEY="YOUR_API_KEY_HERE"
After this, the CLI confirms you’re ready.
Step 4: Start Using Gemini CLI
Now, you can chat with Gemini:
gemini
> Write about Data Science, point wise