AI

Google Gemini CLI

What is Google Gemini CLI?

A command-line AI workflow tool that connects to your tools, understands your code and accelerates your workflows.


Installation

  1. Prerequisites: Ensure you have Node.js version 20 or higher installed.

  2. Run the CLI: Execute the following command in your terminal:

$ npx https://github.com/google-gemini/gemini-cli

Or install it with:

$ npm install -g @google/gemini-cli
  1. Pick a color theme

  2. Authenticate: When prompted, sign in with your personal Google account. This will grant you up to 60 model requests per minute and 1,000 model requests per day using Gemini.


Uninstallation

Method 1: Using npx npx runs packages from a temporary cache without a permanent installation. To "uninstall" the CLI, you must clear this cache, which will remove gemini-cli and any other packages previously executed with npx.

The npx cache is a directory named _npx inside your main npm cache folder. You can find your npm cache path by running npm config get cache.

For macOS / Linux

$ rm -rf "$(npm config get cache)/_npx"

For Windows

Command Prompt

:: The path is typically %LocalAppData%\npm-cache\_npx
rmdir /s /q "%LocalAppData%\npm-cache\_npx"

PowerShell

# The path is typically $env:LocalAppData\npm-cache\_npx
Remove-Item -Path (Join-Path $env:LocalAppData "npm-cache\_npx") -Recurse -Force

Method 2: Using npm (Global Install)

If you installed the CLI globally (e.g., npm install -g @google/gemini-cli), use the npm uninstall command with the -g flag to remove it.

npm uninstall -g @google/gemini-cli
Previous
DataStax