Official Gemini CLI notice: users on the free tier and Google One users will switch to Antigravity CLI starting June 18, 2026. Setups that use an API key with a custom Base URL are not affected.
Quick Setup Guide:
1️⃣ Global npm Package Installation
Run in terminal2️⃣ 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:3️⃣ Apply Configuration
After adding the configuration, executesource ~/.zshrc in terminal and press Enter.
4️⃣ Terminal Launch
Enter in terminal:Initialization Setup
Choose Connection Method

Trust folder, and Gemini CLI restarts automatically. After the restart, the Get started authentication screen appears. If GEMINI_API_KEY is set, Use Gemini API Key is selected by default. Press Enter to confirm:
Enter Gemini API Key input box then appears, prefilled with the value of GEMINI_API_KEY. Check that the value is correct, then press Enter to submit.
To switch the authentication method later, enter
/auth to reopen the authentication screen.Skip the Interactive Selection (Optional)
To skip the selection at startup, add the following to~/.gemini/settings.json:
Launch Success
After completing the above initialization, you can use it normally.