Gemini CLI

Gemini CLI

Step 1: System Requirements

Node.js v18+ is required. Check with:

node -v
Node version check

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
Quick Try npx

Good for quick tests.

Option B: Global install (recommended for regular use)

On command line execute:

npm install -g @google/gemini-cli
Global Install

Then ensure the gemini command works:

gemini --help
Gemini Help

Step 3: Launch and Authenticate

Run on command line:

gemini
Gemini Launch

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