Skip to content
ShareQuota

Gemini CLI with ShareQuota

Gemini CLI reads a base URL and a key from the environment. Two exports and it is talking to the proxy, which serves the Google dialect on its own path.

Gemini CLI honours GOOGLE_GEMINI_BASE_URL and GEMINI_API_KEY. Set the first to the local endpoint and the second to your sq- key and the tool sends its generateContent requests to the proxy, which forwards them to the Gemini account you connected — or translates them for another provider when the model id says so.

The dashboard can do this for youOpen the dashboard, find this tool under CLI tools and turn it on. The original config file is copied to ~/.sharequota/backups before the first write, and turning it off restores exactly what was there. The steps below are the same change, done by hand.

Setup

  1. 1Start the proxy and connect a planRun the binary, open the dashboard, and sign in to your Google account, or paste a Gemini API key.
  2. 2Export the two variablesSet the base URL and the key in your shell profile. The dashboard’s one-click switch sets the same two for you.
  3. 3Run gemini with a model idStart gemini with a routed model. A gemini- prefixed id lands on the Gemini connection; a provider prefix routes elsewhere.

What to set

export GOOGLE_GEMINI_BASE_URL="http://localhost:20130"export GEMINI_API_KEY="sq-your-internal-key"gemini --model gemini/gemini-3.1-pro-preview

Worth knowing

  • One pair is unfinished: a Gemini subscription login streamed through the Anthropic dialect answers 501. Gemini CLI speaks the Google dialect, so it is not affected; the limitations page lists it.

To undo it

Remove the entries above, or turn the integration off in the dashboard and the backup is restored. Nothing else was written.

Questions

Whichever you connected. The free tier is real quota too, and the proxy will spend it before failing over to another connection.

Checked against the tool’s own documentation on 2026-09-13. Settings move; if a field has been renamed, the docs link above is the source.