Connect Gemini CLI to TeamoRouter
Gemini CLI is Google's open-source AI coding CLI, available through the gemini command.
1. Prepare your TeamoRouter API Key
Open the TeamoRouter dashboard, create an account, create an API Key in the sk-teamo-... format, and copy it. You can also view the complete model list in the dashboard.
2. Add TeamoRouter to an existing Gemini CLI installation
Replace <your-TeamoRouter-key> with the key you copied, then paste the full block into your terminal:
mkdir -p ~/.gemini && cat > ~/.gemini/.env <<'EOF'
GOOGLE_GEMINI_BASE_URL=https://api.teamorouter.com
GEMINI_API_KEY=sk-teamo-<your-TeamoRouter-key>
GEMINI_API_KEY_AUTH_MECHANISM=bearer
EOF
After saving, you do not need to restart the terminal or run source. The next gemini command will read the configuration.
When you run gemini, the Get started screen asks how you want to authenticate:
- Sign in with Google
- Use Gemini API Key
- Vertex AI
Move to Use Gemini API Key and press Enter. Gemini will read the TeamoRouter API Key you configured. Press Enter again to continue.
If you already selected OAuth login before, reset it with:
rm ~/.gemini/settings.json
On the next launch, the authentication wizard will appear again. Choose Use Gemini API Key.
3. Install Gemini CLI from scratch
Install Gemini CLI
macOS users can install with Homebrew:
brew install gemini-cli
Or install with npm:
npm install -g @google/gemini-cli
Windows users should use npm and install Node.js first.
Configure TeamoRouter environment variables
Follow the previous section to create ~/.gemini/.env, add the three environment variables, and fill in your TeamoRouter key. Then run gemini.
