Home / Agents / Gemini CLI

Gemini CLI

Google's open-source terminal AI agent

Google Google Gemini macOSLinuxWindows

Gemini CLI is Google's open-source terminal AI agent with built-in search, file, and shell tools and a large context window. It suits engineers who want Gemini models plus command-line automation and scripting. It uses the Gemini /v1beta/models protocol and can be pointed at a proxy via GOOGLE_GEMINI_BASE_URL.

Base URL (root)https://quantoport.comPut this in each tool's base_url or *_BASE_URL setting.
Gemini endpointhttps://quantoport.comGemini API Key auth; GOOGLE_GEMINI_BASE_URL must be HTTPS.
Recommended modelsgemini-3.5-flashgemini-2.5-progemini-3.1-pro-previewNames published in our own catalogue — confirm the live list for your key with GET /v1/models.

Skip it — one-line setup

The script installs Gemini CLI from its official source, writes the gateway settings into the tool's own config file (backing up any existing one) and runs a live check. It asks for your gateway key, or take it from --key / --key-file. --uninstall restores exactly what it wrote.

shell
curl -fsSL https://quantoport.com/agents/gemini-cli/setup | bash

1 · Install

Install Gemini CLI from its own official source.

install
npm install -g @google/gemini-cli
# or Homebrew:
brew install gemini-cli
# or run without installing via npx:
npx @google/gemini-cli

2 · Configure — point it at QuantoPort

Gateway base URL https://quantoport.com; get your key from the console.

config
International site https://quantoport.com (Gemini format, supported directly):
1) Use Gemini API Key auth. In ~/.gemini/settings.json add:
   { "security": { "auth": { "selectedType": "gemini-api-key" } } }
2) Set environment variables:
   export GEMINI_API_KEY=<your gateway key>
   export GOOGLE_GEMINI_BASE_URL=https://quantoport.com
   export GEMINI_MODEL=gemini-2.5-pro
3) Run gemini.
Note: GOOGLE_GEMINI_BASE_URL applies only to gemini-api-key auth, and must be HTTPS.
CN site https://api.shinlinkai.com exposes only the OpenAI format, while Gemini CLI requires the Gemini /v1beta/models protocol; it needs protocol conversion and is not supported yet.

3 · Verify

One request proves you are on our channel.

verify
gemini -p "say hi"
# a reply means the connection works; you can also run gemini and send a prompt interactively.

4 · Common pitfalls

  • Headless/scripted use needs a trust marker: interactive terminals ask once whether to trust the folder; in scripts pass --skip-trust or set GEMINI_CLI_TRUST_WORKSPACE=true, otherwise Gemini CLI reports 'not running in a trusted directory'.
  • If GOOGLE_API_KEY is already set on your machine, Gemini CLI prefers it (prints 'Using GOOGLE_API_KEY') and bypasses the GEMINI_API_KEY this script writes — run `unset GOOGLE_API_KEY` first.
  • Model names follow the gateway /v1beta/models list; this tool uses the site's Gemini-compatible endpoint, no protocol translation needed.

Sources for the tool-side steps: github.com/google-gemini/gemini-cli github.com/google-gemini/gemini-cli/blob/main/docs/reference github.com/google-gemini/gemini-cli/blob/main/docs/get-start