Skip to content

Add Selvedge to Gemini CLI

Run selvedge setup --agent gemini (0.3.12+) to write the MCP entry and GEMINI.md instructions. Selvedge stores the reasoning Gemini CLI records and makes it available to subsequent sessions.

pip install selvedge gives you the selvedge CLI (selvedge setup, selvedge blame, and the selvedge prompt helper below):

Terminal window
pip install selvedge

The MCP config below launches the server with uvx instead of a bare selvedge-server, so the package can be fetched on demand — the editor still needs to find uv installed. Prefer the global binary? Swap uvx --from selvedge selvedge-server for selvedge-server.

Add this to .gemini/settings.json in your project:

{
"mcpServers": {
"selvedge": {
"command": "uvx",
"args": ["--from", "selvedge", "selvedge-server"]
}
}
}

Prefer not to touch config files? selvedge setup detects Gemini CLI and writes this for you (with a .bak first).

Selvedge captures decisions when your agent calls it. Install the instruction block into your project’s GEMINI.md:

Terminal window
selvedge prompt --install GEMINI.md

It’s also a copy-paste block on the site: the Selvedge agent prompt block.

Restart Gemini CLI in the project. Run /mcp and confirm Selvedge’s tools are available. Ask the agent to save a real rejected approach using log_change and retrieve it using prior_attempts in a new session.

The agent must be able to find uvx (manual config) or selvedge-server (wizard setup). Approve the server if prompted. Setup writes GEMINI.md so the agent knows when to use Selvedge; it does not install Claude Code lifecycle hooks.