Gemini CLI setup
Gemini CLI connects to Lumoswitch through the native Gemini protocol. The API configuration must enable Gemini output, and the target model must support the streaming responses and function calls used by Gemini CLI.
Start directly
export GEMINI_API_KEY="your-lumoswitch-access-key" GEMINI_MODEL="your-client-facing-model-name" GOOGLE_GEMINI_BASE_URL="https://api.lumoswitch.com" && \
export GEMINI_CLI_SYSTEM_SETTINGS_PATH="$HOME/.gemini/lumoswitch-system-settings.json" && \
node -e 'const fs=require("node:fs"),path=require("node:path"),p=process.env.GEMINI_CLI_SYSTEM_SETTINGS_PATH;fs.mkdirSync(path.dirname(p),{recursive:true});fs.writeFileSync(p,JSON.stringify({security:{auth:{selectedType:"gemini-api-key",enforcedType:"gemini-api-key"}}},null,2)+"\n",{mode:0o600})' && \
gemini --model "your-client-facing-model-name"Gemini CLI may show its authentication selector on first run even when it finds an API key. This command uses the official GEMINI_CLI_SYSTEM_SETTINGS_PATH override to create a Lumoswitch-specific settings file that selects and enforces gemini-api-key, bypassing the Google sign-in flow. It does not modify the user's existing ~/.gemini/settings.json, and the access key remains only in the current shell environment.
The command needs Node.js, which is also an installation prerequisite for Gemini CLI. Use the site root as the base URL without the OpenAI-compatible /v1 suffix.
References: Gemini CLI authentication and configuration.