Recipe

Gemini CLI with Stable Baseline.

Add Stable Baseline to Gemini CLI in one command, sign in from the browser, and document a repository with the sb-setup prompt.

On a free or Google One account?

Google replaced Gemini CLI with Antigravity CLI for those accounts on 18 June 2026. Use the Antigravity recipe instead. Accounts that still have Gemini CLI can follow this page.

1. Add the server

bash
gemini mcp add --transport http --scope user sb https://api.stablebaseline.io/functions/v1/cloud-serve/mcp

Without --scope user it is added to this project only. Then, in Gemini CLI, run /mcp auth sb: your browser opens to sign in to Stable Baseline and choose what Gemini CLI may reach. Signing in needs a browser on the same machine.

Or add it to a settings file yourself:

ForFile
You, everywhere~/.gemini/settings.json
This project.gemini/settings.json
settings.jsonjson
{
  "mcpServers": {
    "sb": {
      "httpUrl": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp"
    }
  }
}

httpUrl, not url

In Gemini CLI, httpUrl is the setting for a server like Stable Baseline. url means an older kind of connection that Stable Baseline does not offer.

Or use an API key

Create one under Organisation settings, Developers, API keys. See Setup. Refer to it through an environment variable:

settings.jsonjson
{
  "mcpServers": {
    "sb": {
      "httpUrl": "https://api.stablebaseline.io/functions/v1/cloud-serve/mcp",
      "headers": {
        "Authorization": "Bearer $STABLE_BASELINE_API_KEY"
      }
    }
  }
}

Keep the key out of your files

Put your API key in the STABLE_BASELINE_API_KEY environment variable or your tool's secret store, and refer to it from the config as shown. Never paste the key itself into a file you commit or share. Signing in with OAuth avoids keys altogether.

2. Document the repository

Gemini CLI offers Stable Baseline's prompts as commands. Type /sb-setup and say what you want, for example “architecture docs for new engineers”. It then:

  1. Checks the connection

    It confirms it can reach Stable Baseline with your key or sign-in.
  2. Finds your workspace and project

    It never creates them: if it cannot find the ones you mean, it asks you to create them in the app first.
  3. Remembers them

    It writes their ids to .sb/config.json, and keeps .sb/ out of git.
  4. Checks for existing docs

    If the project already has documentation, it asks whether to add to it, replace it, or stop.
  5. Reads the repository

    It works through the code to understand what is there.
  6. Designs a structure

    Folders and documents that fit this repository, not a fixed template.
  7. Writes it

    Folders, documents, and the diagrams each document needs.
  8. Updates AGENTS.md

    It adds a Stable Baseline section with rules for keeping the docs current, and keeps everything else in the file.
  9. Sums up

    It tells you what it created.

3. Try it

  • “What changed in the checkout service this week? Update its document.”
  • “Add a sequence diagram of the sign-in flow to the authentication document.”
  • “Create a plan for the database migration with three phases.”
  • “Log a risk in the work register: the payment provider's rate limits.”