Choose a group and protocol
Create a Gemini key in key management. Both Gemini (特价渠道) and Gemini (官方直连) currently list gemini-3.8-flash. The discount group's description warns of almost no cache hits; do not budget around cache savings. The two groups have different model sets. Check live pricing.
Gemini CLI uses the native Gemini API. MonkeyAI provides /v1beta/ routing; the OpenAI /v1 base is not the native client's base.
Install on Windows, macOS and Linux
Prepare Node.js, then run in Windows PowerShell or a macOS / Linux terminal:
If you already use Homebrew on macOS, brew install gemini-cli is an alternative; choose one installation source. Use WSL if your Windows release requires it. On Linux, prefer a user-owned npm installation rather than automatically adding sudo.
Windows
npm install -g @google/gemini-cli
gemini --versionmacOS
npm install -g @google/gemini-cli
gemini --versionLinux
npm install -g @google/gemini-cli
gemini --versionConfigure the current session
Current Gemini CLI supports GOOGLE_GEMINI_BASE_URL, GEMINI_API_KEY and GEMINI_MODEL. A custom base uses gateway/custom-base API key authentication; older releases may label this API key mode and may lack custom-base support. Windows PowerShell:
$env:GOOGLE_GEMINI_BASE_URL = "https://monkeytheme.com"
$env:GEMINI_API_KEY = "YOUR_API_KEY"
$env:GEMINI_MODEL = "gemini-3.8-flash"
geminimacOS / Linux:
export GOOGLE_GEMINI_BASE_URL="https://monkeytheme.com"
export GEMINI_API_KEY="YOUR_API_KEY"
export GEMINI_MODEL="gemini-3.8-flash"
geminiUse set NAME=value in Windows CMD. If asked to choose authentication, select API key mode. Google account OAuth or Vertex project authentication does not authenticate a MonkeyAI key. If variables are ignored or traffic still targets the official service, stop and inspect that release's help instead of inventing JSON settings or placing the key in a URL.
Persist settings and use the client
Windows users can save the same names in the user environment editor. Edit ~/.zshrc for macOS zsh or ~/.bashrc for Linux bash with the exports. Protect files containing keys, keep them out of Git and reopen the terminal. Temporary trials do not require persistence. Run gemini inside your project, or use this noninteractive example:
gemini -p "Explain the purpose of this project in one sentence"Review which files and prompts are appropriate to send to the service first.
Verification and troubleshooting
Requests are billed according to actual usage. For 401, check the key and authentication mode; for 404, check duplicated /v1beta or an incorrect /v1; for model_not_found, verify the ID in your group. Restart after changing variables. Installation, Google account login and a successful MonkeyAI request are separate checks. See TRAE SOLO for another connection path.