✨
Gemini CLI
GeminiAI Coding Agent
Gemini CLI is Google's Gemini model command-line tool. Through 词元汇, you get broader model coverage while using the Gemini protocol.
Why use 词元汇?
🌍
Multi-protocol Support
Gemini native protocol + OpenAI compatibility
🔄
Failover
Auto-route to other models when Gemini unavailable
📊
Usage Analytics
Unified usage dashboard, cross-model stats
💰
Cost Transparency
RMB billing, transparent pricing
1. Install Gemini CLI
词元汇 API Key — Get it from registration, no Google subscription required → Get Started
npm install -g @google/gemini-cli
2. Configure 词元汇
Gemini CLI uses Gemini native protocol. Point it to 词元汇 via config file:
~/.gemini/settings.json
{"apiKey": "<YOUR_UNIONTOKEN_API_KEY>",
"baseUrl": "https://api.uniontoken.ai/v1"
}
Or use environment variables
# ~/.zshrc
export GEMINI_API_KEY=<YOUR_UNIONTOKEN_API_KEY>
💡 Gemini CLI base URL config may change with versions. If the above doesn't work, check the latest Gemini CLI docs.
3. Verify Configuration
gemini "Hello, introduce yourself"