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 or *_BASE_URL setting.GOOGLE_GEMINI_BASE_URL must be HTTPS.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.
curl -fsSL https://quantoport.com/agents/gemini-cli/setup | bash
1 · Install
Install Gemini CLI from its own official source.
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.
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.
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-trustor setGEMINI_CLI_TRUST_WORKSPACE=true, otherwise Gemini CLI reports 'not running in a trusted directory'. - If
GOOGLE_API_KEYis already set on your machine, Gemini CLI prefers it (prints 'UsingGOOGLE_API_KEY') and bypasses theGEMINI_API_KEYthis script writes — run `unsetGOOGLE_API_KEY` first. - Model names follow the gateway
/v1beta/modelslist; 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