Gemini CLI
Manual install
Section titled “Manual install”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:
winget install OpenJS.NodeJS.LTSchoco install nodejs-ltsscoop install nodejs-ltsOpen a new terminal:
node -v
npm -vnpm install -g @google/gemini-cligemini --versionDownload the Node.js installer from nodejs.org, or install it with Homebrew:
brew install nodeOpen a new terminal:
node -v
npm -vnpm install -g @google/gemini-cligemini --versionUse the Linux installation guidance on nodejs.org or install it from NodeSource, then continue.
node -v
npm -vnpm install -g @google/gemini-cligemini --versionManual setup
Section titled “Manual setup”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.
-
Create and enter the configuration directory.
mkdir %USERPROFILE%\.gemini cd %USERPROFILE%\.geminimkdir -p ~/.gemini cd ~/.geminimkdir -p ~/.gemini cd ~/.gemini -
Create or update
.env.GEMINI_API_KEY=sk-your-token GOOGLE_GEMINI_BASE_URL=https://api.qiuqiutoken.net -
Close all Gemini CLI terminal windows, open a new terminal, then start Gemini CLI from your project.
cd your-project-folder geminicd your-project-folder geminicd your-project-folder gemini
