macOS Setup
Special Offer - Use Vibe Coding API at approximately 0.35x of the original price, exclusively for programming tools!
This guide will help you configure Gemini CLI to use Fizzly API on macOS.
Requirements
- macOS 10.15 (Catalina) or later
- Node.js 22+ installed
- Fizzly API key (Get your key)
Installation Steps
Step 1: Check Environment
Open Terminal and check installed global packages:
npm list -g --depth=0If you don’t have Node.js installed, you can install it via Homebrew or nodejs.org:
# Install Node.js via Homebrew (recommended)
brew install nodeStep 2: Install Gemini CLI
Install Gemini CLI globally using npm:
npm i -g @google/gemini-cli@latestIf you encounter permission errors, use sudo:
sudo npm i -g @google/gemini-cli@latestStep 3: First Run (Very Important!)
This step is crucial! Running Gemini CLI for the first time will automatically create the configuration folder in your user directory.
geminiYou’ll see the welcome screen. Press Ctrl+C to exit. This will create the configuration folder at ~/.gemini.
Configure API
Step 1: Get API Key
Log in to Fizzly Console and create a new API key.
Important: To enjoy the special discounted pricing for programming tools, make sure to select the vibe coding group when creating your API key. This group’s API is exclusively for use with Claude Code, Codex CLI, Gemini CLI, and similar programming tools.

Step 2: Open Configuration Directory
In Finder, press Cmd + Shift + G and enter the following path:
~/.gemini
You’ll see the configuration files in the directory:

Or use terminal command:
# Open config directory in Finder
open ~/.geminiStep 3: Edit Configuration File
In the .gemini directory, create or edit the .env file.
Using terminal to edit:
nano ~/.gemini/.envAdd the following content:
GOOGLE_GEMINI_BASE_URL=https://api.fizzlyapi.com
GEMINI_API_KEY=your-fizzly-api-key
GEMINI_MODEL=gemini-2.5-proReplace your-fizzly-api-key with your actual API key from the Fizzly Console.
Save the file (in nano: Ctrl+O to save, Ctrl+X to exit)
Step 4: Verify Configuration
After saving the file, restart Gemini CLI:
geminiIf configured successfully, you’ll see Gemini CLI running normally:

Alternative Configuration Methods
Add to ~/.zshrc file (default shell on macOS Catalina+):
# Open .zshrc
nano ~/.zshrc
# Add these lines at the end:
export GOOGLE_GEMINI_BASE_URL="https://api.fizzlyapi.com"
export GEMINI_API_KEY="your-fizzly-api-key"
export GEMINI_MODEL="gemini-2.5-pro"Apply changes:
source ~/.zshrcIf .zshrc config doesn’t take effect, you may need to add to ~/.zprofile:
echo 'source ~/.zshrc' >> ~/.zprofileSupported Models
All Google Gemini models are supported. See Gemini CLI Models.
Basic Usage
# Start interactive mode
gemini
# Start in current project directory
cd your-project
gemini
# Run single command
gemini "Write a Python quicksort function"
# Use specific model
gemini --model gemini-2.5-flash
# Show help
gemini --helpTroubleshooting
1. “gemini” command not found
Cause: Gemini CLI is not installed or not in PATH.
Solution:
# Reinstall Gemini CLI
npm install -g @google/gemini-cli
# Or use sudo
sudo npm install -g @google/gemini-cli
# Check installation location
which gemini2. “GEMINI_API_KEY not set” error
Cause: Environment variable or configuration file not properly set.
Solution:
First check the configuration file:
# View configuration file content
cat ~/.gemini/.envIf the file doesn’t exist or is incorrect, follow the “Configure API” steps above.
3. Connection timeout
Cause: Network issues or firewall blocking.
Solution:
- Check your network connection
- Verify API URL is correct:
https://api.fizzlyapi.com - If using VPN or enterprise network, you may need to configure proxy
4. Authentication failed (401)
Cause: Invalid or expired API key.
Solution:
- Verify your API key in Fizzly Console
- Ensure the key is not deleted or disabled
- Re-copy and paste the key (avoid extra spaces)
5. Insufficient balance (403)
Cause: Account balance depleted.
Solution:
- Check balance in Fizzly Console
- Top up your account in Billing → Recharge
- Retry after balance is updated
6. Security blocked
Cause: macOS Gatekeeper is blocking execution.
Solution:
- Open System Preferences → Security & Privacy
- Click Open Anyway to allow Gemini CLI to run
Need more help? Check the FAQ page.
Next Steps
- Windows Setup - Configure Gemini CLI on Windows
- Linux Setup - Configure Gemini CLI on Linux
- FAQ - Frequently Asked Questions