Skip to main content
Power your Gemini CLI with Aihubmix for stable and efficient Gemini model services.

Quick Setup Guide:

1️⃣ Global npm Package Installation

Run in terminal
Ensure your Node.js version >= 18 For more detailed information, refer to:
  1. Official Repository
  2. Detailed Configuration

2️⃣ Environment Variable Configuration

Add your Aihubmix API key and forwarding address to your system environment variables. You can generate the API key from the Aihubmix 「Keys」page. For example, add to ~/.zshrc:
For Mac users, you can show hidden .zshrc file in your username directory using shortcut ⌘ + ⇧ + ., then open it with the system “TextEdit” app to add the above content.

3️⃣ Apply Configuration

After adding the configuration, execute source ~/.zshrc in terminal and press Enter.

4️⃣ Terminal Launch

Enter in terminal:

Initialization Setup

Choose Connection Method

Connection Method After launch, type /auth and press Enter, then select Gemini API Key (AI Studio)
You can use the /auth command anytime to switch authorization methods.

Launch Success

After completing the above initialization, you can use it normally. Connection Method

Enjoy using it!

Last updated: 2026-06-01