Developer Docs › Gemini CLI

Gemini CLI

Use Onefast API in Gemini CLI, Google's official command-line assistant.

1. Install

Shell

npm install -g @google/gemini-cli@latest

2. Configure

Edit ~/.gemini/.env (create it if it doesn't exist):

~/.gemini/.env

GOOGLE_GEMINI_BASE_URL=https://api.onefast.ai
GEMINI_API_KEY=sk-xxx
GEMINI_MODEL=gemini-2.5-pro
  • Set GOOGLE_GEMINI_BASE_URL to the root URL — without /v1.
  • GEMINI_MODEL can be any other Gemini model from the model catalog.

3. Verify

Shell

gemini -p "Introduce yourself in one sentence."

If you're asked to choose a sign-in method on first launch, choose Use Gemini API Key.