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 --versionYou 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 nodejsInstall Gemini CLI
Install Gemini CLI globally using npm:
npm install -g @anthropic-ai/claude-codeIf you encounter permission errors, use sudo:
sudo npm install -g @anthropic-ai/claude-codeOr 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-codeFirst Run (Important)
This step is very important! Running Gemini CLI for the first time generates the configuration directory:
geminiAfter 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.
- Create or edit the config file:
# Use nano editor (or your preferred editor)
nano ~/.gemini/.env- Add 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+Oto save,Ctrl+Xto exit)
Verify Configuration
Run the following command to verify your setup:
# Start Gemini CLI
geminiIf 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 --helpTroubleshooting
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 prefix2. “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/.envIf the file doesn’t exist or is incorrect, follow the “Config File” method above.
3. Connection Timeout
Cause: Network issues or firewall blocking.
Solution:
- Check your internet connection
- Verify the API URL is correct:
https://api.fizzlyapi.com - Check firewall settings:
# Check iptables rules sudo iptables -L - If using corporate network, you may need proxy settings
4. Authentication Failed (401)
Cause: Invalid or expired API key.
Solution:
- Verify your API key in the Fizzly Console
- Ensure the key has not been deleted or disabled
- Copy and paste the key again (watch for extra spaces)
5. Insufficient Balance (403)
Cause: Your account balance is depleted.
Solution:
- Check your balance in the Fizzly Console
- Top up your account in Billing → Top Up
- 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-codeMethod 2: Configure npm global directory (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcNeed more help? Check the FAQ page.
Next Steps
- Windows Configuration - Configure Gemini CLI on Windows
- macOS Configuration - Configure Gemini CLI on macOS
- FAQ - Frequently Asked Questions