Linux Configuration

0.35x Price - Programming tool APIs at 0.35x of the original price!

This guide will help you configure Gemini CLI with Fizzly API on Linux.

Prerequisites

  • Popular Linux distributions (Ubuntu, Debian, CentOS, Fedora, etc.)
  • Node.js 18+ installed
  • Fizzly API key (Get one here)

Install Gemini CLI

Check Node.js Version

Open terminal and verify Node.js is installed:

node --version
npm --version

You should see output like v18.x.x or higher. If not, install Node.js.

Install Node.js (if not installed):

# Install Node.js 18 using NodeSource
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs

Install Gemini CLI

Install Gemini CLI globally using npm:

npm install -g @anthropic-ai/claude-code
⚠️

If you encounter permission errors, use sudo:

sudo npm install -g @anthropic-ai/claude-code

Or configure npm global directory (recommended):

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g @anthropic-ai/claude-code

First Run (Important)

This step is very important! Running Gemini CLI for the first time generates the configuration directory:

gemini

After seeing the welcome screen, press Ctrl+C to exit. This creates the configuration folder at ~/.gemini.

Configure API

Recommended method - Using a config file is more stable and reliable.

  1. Create or edit the config file:
# Use nano editor (or your preferred editor)
nano ~/.gemini/.env
  1. Add the following content:
~/.gemini/.env
GOOGLE_GEMINI_BASE_URL=https://api.fizzlyapi.com
GEMINI_API_KEY=your-fizzly-api-key
GEMINI_MODEL=gemini-2.5-pro
⚠️

Replace your-fizzly-api-key with your actual API key from the Fizzly Console.

  1. Save the file (in nano: Ctrl+O to save, Ctrl+X to exit)

Verify Configuration

Run the following command to verify your setup:

# Start Gemini CLI
gemini

If you see the Gemini CLI interactive prompt, congratulations! Your setup is complete.

Expected output:

╭──────────────────────────────────────────────────╮
│ ✻ Welcome to Gemini CLI!                         │
│                                                  │
│ /help for available commands                     │
│ Type your message to get started                 │
╰──────────────────────────────────────────────────╯
>

Supported 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 a single command
gemini "Explain this code" -f ./myfile.py
 
# Use a specific model
gemini --model gemini-2.5-flash
 
# Show help
gemini --help

Troubleshooting

1. “gemini” Command Not Found

Cause: Gemini CLI is not installed or not in PATH.

Solution:

# Reinstall Gemini CLI
npm install -g @anthropic-ai/claude-code
 
# Or use sudo
sudo npm install -g @anthropic-ai/claude-code
 
# Check installation location
which gemini
 
# Check if npm global path is in PATH
npm config get prefix

2. “GEMINI_API_KEY not set” Error

Cause: Environment variables or config file not set correctly.

Solution:

First check the config file:

# View config file contents
cat ~/.gemini/.env

If the file doesn’t exist or is incorrect, follow the “Config File” method above.

3. Connection Timeout

Cause: Network issues or firewall blocking.

Solution:

  1. Check your internet connection
  2. Verify the API URL is correct: https://api.fizzlyapi.com
  3. Check firewall settings:
    # Check iptables rules
    sudo iptables -L
  4. If using corporate network, you may need proxy settings

4. Authentication Failed (401)

Cause: Invalid or expired API key.

Solution:

  1. Verify your API key in the Fizzly Console
  2. Ensure the key has not been deleted or disabled
  3. Copy and paste the key again (watch for extra spaces)

5. Insufficient Balance (403)

Cause: Your account balance is depleted.

Solution:

  1. Check your balance in the Fizzly Console
  2. Top up your account in BillingTop Up
  3. Try again after the balance is updated

6. Permission Denied

Cause: npm global installation permission issues.

Solution:

Method 1: Use sudo

sudo npm install -g @anthropic-ai/claude-code

Method 2: Configure npm global directory (recommended)

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Need more help? Check the FAQ page.

Next Steps