Gemini CLI

Prerequisites

Configuration

Set environment variables to configure Gemini CLI to use Chuizi.AI:

terminal
bash
export GEMINI_API_KEY=ck-your-key-here

Also configure the base URL to point to Chuizi.AI's Gemini endpoint:

terminal
bash
export GEMINI_API_BASE_URL=https://api.chuizi.ai/gemini

To make this permanent, add to your shell configuration file:

terminal
bash
echo 'export GEMINI_API_KEY=ck-your-key-here' >> ~/.zshrc
echo 'export GEMINI_API_BASE_URL=https://api.chuizi.ai/gemini' >> ~/.zshrc
source ~/.zshrc

Usage

Once configured, use Gemini CLI as normal:

terminal
bash
# Start a conversation
gemini

# Single query
gemini "explain this error message"

# Analyze a file
gemini "summarize this file" < README.md

Verify the Configuration

  1. Run the following in your terminal:
    terminal
    bash
    gemini "say hello"
  2. If you receive a normal response, the configuration is working
  3. Check the Chuizi.AI dashboard request logs to confirm

Common Issues

Connection Failed

Verify the GEMINI_API_BASE_URL environment variable is correctly set to https://api.chuizi.ai/gemini. Run echo $GEMINI_API_BASE_URL to check.

Authentication Error

Confirm your GEMINI_API_KEY starts with ck- and is enabled in the Chuizi.AI dashboard.

Model Not Available

Chuizi.AI supports Gemini model series. To view available models, visit the models page.

Next Steps