Install Gemini CLI on Windows
Complete guide for installing Gemini CLI on Windows 10 and Windows 11.
Step 1: Install Node.js
Gemini CLI requires Node.js 16.0 or higher. Follow these steps:
- 1. Download Node.js:
Visit nodejs.org and download the LTS version for Windows.
- 2. Run the installer:
Double-click the downloaded .msi file and follow the installation wizard.
- 3. Verify installation:
Open Command Prompt or PowerShell and run:
node --version
npm --version
Step 2: Install Gemini CLI
Open Command Prompt or PowerShell as Administrator:
# Install Gemini CLI globally
npm install -g @google/gemini-cli
Note: If you encounter permission errors, try running the command prompt as Administrator (right-click → Run as Administrator).
Step 3: Configure PATH (if needed)
If the gemini
command is not recognized, you may need to add npm's global directory to your PATH:
- 1. Find npm global directory:
npm config get prefix
- 2. Add to PATH:
- Open System Properties → Advanced → Environment Variables
- Under "User variables", select "Path" and click "Edit"
- Add the npm global directory path (usually
C:\Users\[username]\AppData\Roaming\npm
) - Click OK and restart your terminal
Step 4: Verify Installation
Test that Gemini CLI is installed correctly:
# Check version
gemini --version
# View help
gemini --help
Common Issues and Solutions
Error: EACCES permission denied
Solution: Run Command Prompt as Administrator
# Or configure npm to use a different directory
npm config set prefix "%USERPROFILE%\npm-global"
'gemini' is not recognized as a command
Solution: Add npm global directory to PATH (see Step 3)
Network or proxy issues
Solution: Configure npm proxy settings:
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Next Steps
Now that Gemini CLI is installed, configure your API key to start using it: