Skip to content

Gemini CLI

Gemini CLI is Google's command-line interface for Gemini models. Environment variable support for custom endpoints is still evolving upstream.

Mode

Direct mode only (Beta). Gemini CLI's support for a custom OpenAI-compatible base URL is still evolving upstream — the variable name has changed across releases. Check the project README for the current configuration before relying on this.

1. Set environment variables

At minimum, set your Corveil virtual key as the Gemini API key. If your version of the CLI supports an OpenAI-compatible base URL override, also set it to your Corveil endpoint:

bash
export GEMINI_API_KEY="sk-citadel-your-key-here"
# If your gemini-cli release supports it, also export a base URL such as:
#   export GEMINI_BASE_URL="https://your-corveil-host/v1"
# Check the upstream README for the exact variable name in your version.

2. Launch Gemini CLI

bash
gemini

Troubleshooting

  • Env vars not recognized: Gemini CLI's env var support is evolving. Check the project README for the latest configuration options
  • 401 Unauthorized: Verify GEMINI_API_KEY is a valid Corveil virtual API key