Overview
Google Gemini CLI is a command-line tool for interacting with Gemini models. LemonData provides a compatible endpoint that allows you to use Gemini CLI with access to 300+ models.System Requirements
- Node.js: Version 20.0+
- OS: Windows 10/11, macOS 10.15+, Ubuntu 20.04+, or Debian 10+
Installation
Configuration
Step 1: Get Your API Key
- Log into LemonData Dashboard
- Navigate to API Keys
- Create and copy your API key (format:
sk-...)
Step 2: Set Environment Variables
Temporary (current session):- Bash
- Zsh
- Fish
Known limitation: In some cases, the Gemini CLI may not respect
GOOGLE_GEMINI_BASE_URL if there’s a cached Google session. If you experience connection issues, try clearing the CLI cache or starting a fresh terminal session.Basic Usage
Start Gemini CLI from your project directory:- Choose a theme
- Confirm safety notice
- Trust the working directory
Available Models
| Model | Description |
|---|---|
gemini-2.5-pro | Most capable Gemini model |
gemini-2.5-flash | Fast, efficient for most tasks |
gemini-2.0-flash | Previous generation, stable |
Common Commands
Ask a question:Verify Configuration
Troubleshooting
Connection Error
Connection Error
- Verify
GOOGLE_GEMINI_BASE_URLis set tohttps://api.lemondata.cc - Note: No
/v1suffix for Gemini endpoint - Check network connectivity
Authentication Failed
Authentication Failed
- Verify
GEMINI_API_KEYenvironment variable is set - Check that the key starts with
sk- - Ensure the key is active in LemonData dashboard
Model Not Available
Model Not Available
- Check Gemini models availability at lemondata.cc/en/models
- Try a different Gemini model variant
Best Practices
Use in project directory
Use in project directory
Always run Gemini CLI from your project root for better context understanding.
Trust directories carefully
Trust directories carefully
Only trust directories you own. Gemini CLI can read and modify files.
Review generated code
Review generated code
Always review AI-generated code before committing to your project.