setup

A setup command for checking Gemini CLI installation and sign-in, choosing a default model, and viewing the review-gate setting.

In plain words
What is it for?
Use it to install Gemini when needed, check authentication, set configuration flags, or inspect the current setup state.
Why use it?
It shows whether Gemini is ready and helps configure the settings needed by the other Gemini commands.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/bytelandtechnology/gemini-cc/setup
Clone the repo
git clone --depth 1 https://github.com/ByteLandTechnology/gemini-cc
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,229 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.01229
Opus 5 $0.00006 $0.00615
Sonnet 5 $0.00003 $0.00246
Haiku 4.5 $0.00001 $0.00123

Measured 2d ago against content hash 4af5a363dde1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/gemini/commands/setup.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

First, run the setup helper with any explicit flags the user provided:

node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --json $ARGUMENTS

Parse the JSON output to extract:

  • ready — whether Gemini is installed and authenticated
  • provider.available — whether Gemini CLI is installed
  • auth.loggedIn — whether Gemini is authenticated
  • auth.detail — authentication detail message
  • reviewGateEnabled — current review gate state
  • defaultModel — current default model (may be null)

If explicit flags were provided (i.e., $ARGUMENTS is not empty):

  • Present the final setup output to the user.
  • Stop here.

If no explicit flags were provided, proceed to interactive mode:

If provider.available is false and npm is available:

  • Use AskUserQuestion exactly once to ask whether Claude should install Gemini now.
  • Put the install option first and suffix it with (Recommended).
  • Use these two options:
    • Install Gemini CLI (Recommended)
    • Skip for now
  • If the user chooses install, run:
npm install -g @google/gemini-cli
  • Then rerun: node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --json

If provider.available is true but auth.loggedIn is false:

  • Present the auth guidance from auth.detail and stop.
  • Do not offer to install; the CLI is already installed.
  • Preserve guidance to run gemini and complete /auth, or set GEMINI_API_KEY / GOOGLE_API_KEY.

If ready is true, present a menu using AskUserQuestion to configure settings.

Menu questions (ask one at a time in this order):

  1. Model selection — ask which model to use as default:

    question: "Which model should be the default for /gemini:rescue and /gemini:review?"
    header: "Default Model"
    options:
      - label: "gemini-3.1-pro-preview (Recommended)"
        description: "Latest pro, highest capability"
      - label: "gemini-2.5-pro"
        description: "Pro tier, strong reasoning"
      - label: "gemini-3-flash-preview"
        description: "Latest flash, fast and capable"
      - label: "gemini-2.5-flash"
        description: "Fast, lower cost, good for most tasks"
      - label: "gemini-3.1-flash-lite-preview"
        description: "Latest lite model, lowest latency"
      - label: "gemini-2.5-flash-lite"
        description: "Lighter weight, lowest cost"
      - label: "Auto"
        description: "Let Gemini CLI decide"
      - label: "Custom model..."
        description: "Enter a custom model name"
    multiSelect: false
    
    • If user selects "Auto", run: node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --set-model "" --json
    • If user selects "Custom model...", ask a follow-up question:
      question: "Enter the custom model name:"
      header: "Custom Model"
      options:
        - label: "Continue"
          description: "Use the model name you provide"
      multiSelect: false
      
      The user's answer is the custom model name. Run: node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --set-model <answer> --json
    • Otherwise run: node "${CLAUDE_PLUGIN_ROOT}/scripts/gemini-companion.mjs" setup --set-model <model-id> --json (Use the model ID from the selected option label, e.g. gemini-2.5-flash)
  2. Review gate — if reviewGateEnabled is false, ask:

    question: "Enable the stop-time review gate? When enabled, Gemini reviews Claude's response before each stop and may block the stop if issues are found."
    header: "Review Gate"
    options:
      - label: "Enable review gate"
        description: "Require Gemini review before stops"
      - label: "Keep disabled (Recommended)"
        description: "No extra review at stop time"
    multiSelect: false
    

    If reviewGateEnabled is true, ask:

    question: "The review gate is currently enabled. Disable it?"
    header: "Review Gate"
    options:
      - label: "Disable review gate"
        description: "Stop requiring Gemini review before stops"
      - label: "Keep enabled"
        description: "Continue requiring review before stops"
    multiSelect: false
    

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 133 lines · 13 tokens per session scan A 4af5a363dde1

Subscribe to this mod's changes

setup is a command published in the GitHub repository ByteLandTechnology/gemini-cc (1 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 1,229 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.