Installing Gemini CLI

Setup
Set up Google’s Gemini CLI for AI assistance in your terminal.
Published

January 1, 2026

Installing Gemini CLI

Creating with AI in the Loop — Terminal AI assistant

Gemini CLI brings Gemini AI directly to your terminal. You can ask questions, generate code, and work with your codebase from the command line.


macOS

brew install gemini-cli

Verify: gemini --version


Windows

1) Install Node.js (version 20 or higher)

Download the LTS installer from https://nodejs.org and run it. Reboot if prompted.

Verify:

node -v
npm -v

2) Install Gemini CLI

npm install -g @google/gemini-cli

Verify: gemini --version


First run: Sign in

  1. Open a terminal in your project directory.
  2. Run gemini.
  3. Select Login with Google.
  4. Sign in with your personal Google account (not your .edu account).

After signing in, you can start chatting with Gemini about your code.


Free tier

  • Gemini CLI can be used for free with a free tier Google Account
  • Gemini CLI and Gemini Code Assist agent mode share quotas
  • If you hit usage limits, you may need to wait until the next day for limits to reset
  • There is also a paid tier with higher limits if needed

Troubleshooting

macOS: brew: command not found

Install Homebrew first. See Initial Setup (macOS).

Windows: node or npm not recognized

Restart your terminal after installing Node.js. If still not working, reinstall Node.js and make sure “Add to PATH” is checked.

Authentication issues

  • Use a personal Google account, not your .edu account
  • Try signing out and back in: gemini --logout then gemini

Resources

Back to top