Model availability changes over time. Check the CometAPI Models page
for currently available Gemini models.
Prerequisites
| Requirement | Details |
|---|---|
| Node.js | 22+ (LTS recommended) |
| OS | macOS, Linux, or Windows |
| CometAPI key | From your CometAPI Dashboard (starts with sk-) |
Setup
Persist environment variables
To avoid re-exporting every session, add to your shell config:Troubleshooting
| Symptom | Fix |
|---|---|
Invalid API Key error | Verify GEMINI_API_KEY is set correctly. Run echo $GEMINI_API_KEY to check |
fetch failed | Network restrictions may block the connection. Try a system-wide proxy |
| Wrong Node.js version | Gemini CLI requires Node.js 22+. Run node --version to check |
| Uninstall | npm uninstall -g @google/gemini-cli |