Gemini

Gemini Setup Guide

Connect Gemini with a Passion8 URL, API key and model. Start with Cline in VS Code or the API, or configure Gemini CLI manually or with CC Switch.

To use Gemini through Passion8, you need a Passion8 API key, an enabled model ID and the URL for your protocol. For Cline in VS Code, select OpenAI Compatible and set the base URL to https://passion8.cc/v1; Gemini CLI uses the native protocol root https://passion8.cc. A Google account or Google OAuth is not required.

If you do not have a Passion8 key yet, follow Quickstart to create a token before choosing a client below.

#Choose your workflow

ScenarioRecommended entryConfiguration
Read code, edit files and review diffs in VS CodeCline editor setuphttps://passion8.cc/v1 + Passion8 key + model
Call models from your applicationGemini API and SDKChoose the native or compatible protocol URL
Continue an existing Gemini CLI workflowCLI configuration belowhttps://passion8.cc + Passion8 key + model
Complete a project task after connectingCoding workflowAnalysis, planning, edits and acceptance

#Has Gemini CLI been replaced?

Google moved Gemini CLI and Code Assist IDE login service for the free individual tier, Google AI Pro and Ultra to Antigravity on 2026-06-18. The official announcement retains paid Gemini API key access, and the CLI configuration still supports a custom GOOGLE_GEMINI_BASE_URL.

Passion8 recommends Cline or API for new users. Existing API-key CLI users can use the configuration below. Google OAuth or an official subscription is not required, and Antigravity account setup is not part of Passion8 onboarding.

#Gemini CLI installation and configuration

Connect with a Passion8 API key. After installing Gemini CLI, configure the provider manually or through CC Switch; Google OAuth is not part of this gateway setup.

#Goal: complete a reviewable change in your repository

This tutorial covers installation, authentication, configuration, project context, task execution and acceptance. The CLI can edit files and execute commands. Enter the intended repository and inspect existing changes first so unrelated edits stay identifiable.

#1. Install and check the version

node --version
npm install -g @google/gemini-cli
gemini --version

Use the Node.js range supported by the official installation guide. gemini --version should print a version. If the command is missing, check the global npm bin directory in PATH. For a temporary run, use npx @google/gemini-cli. Record the team’s version before upgrading.

#2. Prepare a Passion8 key and model

Create an API key in the Passion8 console and copy an enabled Gemini model ID. Gemini CLI uses the native Gemini protocol, so the root is https://passion8.cc, not https://passion8.cc/v1. Do not append /gemini or /v1beta yourself.

#3. Choose manual setup or CC Switch

#Option A: manual configuration

On macOS / Linux, configure the terminal that will launch the CLI:

export GEMINI_API_KEY="replace-with-your-Passion8-key"
export GOOGLE_GEMINI_BASE_URL="https://passion8.cc"
export GEMINI_MODEL="replace-with-an-enabled-Gemini-model-ID"
gemini --model "$GEMINI_MODEL"

Windows PowerShell:

$env:GEMINI_API_KEY="replace-with-your-Passion8-key"
$env:GOOGLE_GEMINI_BASE_URL="https://passion8.cc"
$env:GEMINI_MODEL="replace-with-an-enabled-Gemini-model-ID"
gemini --model $env:GEMINI_MODEL

If the CLI still opens Google login, exit it and merge these fields into ~/.gemini/settings.json, preserving existing MCP and other settings. Authentication must be gemini-api-key:

{
  "security": { "auth": { "selectedType": "gemini-api-key" } },
  "general": { "defaultApprovalMode": "default" },
  "context": { "fileName": "GEMINI.md" }
}

#Persist settings for future launches

Create and open the user configuration file. On macOS:

mkdir -p ~/.gemini
touch ~/.gemini/.env
open -e ~/.gemini/.env

On Windows PowerShell:

New-Item -ItemType Directory -Force "$env:USERPROFILE\.gemini" | Out-Null
if (-not (Test-Path "$env:USERPROFILE\.gemini\.env")) {
  New-Item -ItemType File "$env:USERPROFILE\.gemini\.env" | Out-Null
}
notepad "$env:USERPROFILE\.gemini\.env"

Save these three lines, replacing placeholders with your Passion8 key and enabled model ID. Update existing entries with the same names instead of appending duplicates:

GEMINI_API_KEY=replace-with-your-Passion8-key
GOOGLE_GEMINI_BASE_URL=https://passion8.cc
GEMINI_MODEL=replace-with-an-enabled-Gemini-model-ID

Save, exit the old CLI, open a new terminal and run gemini. This is user-level configuration; keep real keys outside project Git history. Existing shell variables, project .env files and project .gemini/settings.json can override it, so check conflicts after switching providers.

#Option B: CC Switch

  1. Install the desktop app from CC Switch releases.
  2. Select Gemini CLI, add a provider and choose Custom Configuration, not Google Official.
  3. Set the name to Passion8, enter the Passion8 key, use https://passion8.cc as the endpoint, and select an enabled model ID.
  4. Review the configuration, save and activate the provider. Third-party providers use API key authentication.
  5. Exit the old CLI and restart the terminal or Gemini CLI. Direct mode is sufficient for this native Gemini endpoint; protocol conversion is not required.

The relevant configuration preview should look like:

{
  "env": {
    "GEMINI_API_KEY": "replace-with-your-Passion8-key",
    "GOOGLE_GEMINI_BASE_URL": "https://passion8.cc",
    "GEMINI_MODEL": "replace-with-an-enabled-Gemini-model-ID"
  }
}

Choose either manual configuration or CC Switch as your configuration source. Remove previously exported stale keys or endpoints before restarting so they do not override CC Switch's files.

#4. Verify the connection first

Restart gemini and enter:

Reply only OK. Do not read files or run commands.

After receiving an answer, check the request time, model and usage in the Passion8 console. A normal answer plus the matching console record verifies this request used Passion8. If Google OAuth appears, return to step 3 and check gemini-api-key and stale configuration. For model errors, verify the complete ID enabled on Passion8.

#Advanced: configure project context

Save this in the repository root, then add actual build and test commands for your project. Do not impose Node-specific assumptions on another stack.

# Project instructions

- Read package.json before choosing build or test commands.
- Use the package manager specified by the lockfile.
- Keep changes limited to the requested task.
- Do not edit generated files or commit credentials.
- After a change, run the relevant existing test and report the command/result.
- If a required command is absent, report it instead of inventing a successful run.

Run /memory show inside the CLI to inspect loaded instructions. After editing the file, run /memory refresh. If it is absent, check your working directory, filename and context settings.

#Advanced: run a project task

Start with: “Inspect this repository read-only. Identify startup commands, test entry points and one file suitable for a small change. Do not edit.” After checking the result, request a specific task, such as: “Add one defined edge case to the existing string utility, follow the current test style, run the relevant test and explain the diff.”

Review file and command approval prompts. Afterwards, inspect the repository yourself:

git diff --stat
git diff
git status --short

Acceptance requires a relevant diff and actual test results, not only a completion message. If the project has no test command, record the missing verification explicitly.

#Troubleshooting

ProblemDiagnostic step
Unauthorized after loginMatch authentication mode and key provider, then restart
Model not foundCopy the full model ID from Passion8, verify account group, access and endpoint, then update GEMINI_MODEL and restart
Instructions ignoredUse /memory show to confirm the file was loaded
Unrelated changesNarrow the task and review the diff
Custom endpoint returns 404Verify native Gemini protocol and API root; changing only the key is insufficient

#Official sources and verification

Checked: 2026-10-11

Support

Need help?

For setup, billing, or model issues, email us. Check the status page for uptime.

WeChat / QQ support is available at the bottom right.