Prerequisites
Before you begin, ensure you have:- Windows 10 or Windows 11
- Administrator access to your computer
- Active internet connection
Installation Steps
Install Node.js
Gemini CLI requires Node.js to run. Install the LTS (Long Term Support) version using one of these methods:This should display the installed Node.js version (e.g.,
Option A: Using winget (Recommended)
Open PowerShell or Command Prompt and run:Option B: Manual Download
- Visit nodejs.org
- Download the LTS version for Windows
- Run the installer and follow the installation wizard
- Accept all default settings during installation
After installing Node.js, close and reopen your terminal window for the changes to take effect.
Verify Installation
After installation, verify Node.js is correctly installed:v20.11.0).Install Gemini CLI Globally
With Node.js installed, install the Gemini CLI package globally using npm:This process may take 1-2 minutes depending on your internet connection.Or simply check if the command is available:
Verify Installation
Confirm Gemini CLI is installed correctly:Create Desktop Shortcut (Optional)
For convenient access, create a desktop shortcut that launches Gemini CLI:
Using PowerShell
Run this command in PowerShell:Manual Shortcut Creation
Alternatively, create the shortcut manually:- Right-click on your desktop
- Select New → Shortcut
- Enter this as the location:
- Name it “Gemini CLI”
- Click Finish
The shortcut launches PowerShell and automatically runs the
gemini command, keeping the window open for interaction.Initial Configuration
Launch Gemini CLI for the first time:Or double-click the desktop shortcut if you created one.You’ll be prompted to configure:
1. Select Theme
Choose your preferred color theme or press Enter to use the default.2. Select Auth Method
Choose “Login with Google” (should be pre-selected) and press Enter.A browser window will open. Sign in with your Google account to authenticate Gemini CLI.After authentication, you can start using all Gemini CLI features immediately.
Troubleshooting
Node.js command not found
Ifnode command is not recognized after installation:
- Close all terminal windows
- Open a new terminal
- Try the command again
- Open System Environment Variables
- Edit the Path variable
- Add:
C:\Program Files\nodejs - Restart your terminal
npm install fails with permission errors
Solution 1: Run terminal as Administrator Solution 2: Clear npm cache and retry:Gemini command not found after installation
-
Verify the global npm packages directory is in your PATH:
- The output path should be in your system PATH. If not, add it manually.
-
Typical npm global installation paths:
C:\Users\<YourUsername>\AppData\Roaming\npmC:\Program Files\nodejs
Updating Node.js
To update Node.js to the latest LTS version:Using winget
Manual Update
- Download the latest LTS installer from nodejs.org
- Run the installer (it will upgrade your existing installation)
The automated installer checks for and applies Node.js updates automatically. Manual installations require periodic updates.
Next Steps
After successful installation:- Learn about authentication
- Use the desktop shortcut for easy access
- Check the troubleshooting guide if you encounter issues