Skip to content

Gemini CLI

If your machine does not have the gemini command yet, install Gemini CLI for your system first. If Gemini CLI is already installed, go straight to manual setup.

Download the Node.js installer from nodejs.org, or choose one package-manager command:

cmd
winget install OpenJS.NodeJS.LTS
cmd
choco install nodejs-lts
cmd
scoop install nodejs-lts

Open a new terminal:

cmd
node -v
npm -v
cmd
npm install -g @google/gemini-cli
cmd
gemini --version

If you are not using CC Switch, create Gemini CLI’s .env manually. Use the Gemini-compatible root Base URL without appending /v1, and use a token from the Gemini CLI group.

  1. Create and enter the configuration directory.

    cmd
    mkdir %USERPROFILE%\.gemini
    cd %USERPROFILE%\.gemini
  2. Create or update .env.

    dotenv
    GEMINI_API_KEY=sk-your-token
    GOOGLE_GEMINI_BASE_URL=https://api.qiuqiutoken.net
  3. Close all Gemini CLI terminal windows, open a new terminal, then start Gemini CLI from your project.

    cmd
    cd your-project-folder
    gemini