Skip to main content
TRW
Skip to content
TRWGemini CLI — Client Guide

Set up TRW for Gemini CLI

Bring durable engineering memory to Gemini’s native surfaces — a repo-wide instruction file, MCP settings, and role-based subagents, tuned for very large-context sessions.

Prerequisites

  • Gemini CLI installed and authenticated.
  • Python 3.10+ (3.11+ recommended) and pip 22+.
  • A git repository you can write to — TRW writes repo-local files only.

Install

curl -fsSL https://trwframework.com/install.sh | bash

When the installer prompts for target clients, select Gemini CLI. The bootstrap installs trw-mcp and writes the Gemini-native surface into the repo.

What the installer writes

  • GEMINI.md — repo-wide instructions with the TRW ceremony protocol. Gemini reads it on startup, so the tool lifecycle is in context from the first turn.
  • .gemini/settings.json — registers trw-mcp under mcpServers via a JSON deep-merge (only the trw entry is touched).
  • .gemini/agents/trw-*.md role-based subagent definitions translated from the TRW roster.
  • .trw/config.yaml — repo-local TRW config listing Gemini in target_platforms.

Run your first session

From the project root, start Gemini the way you normally would. It loads GEMINI.md and the MCP server from .gemini/settings.json, which tell the model to begin with trw_session_start().

  1. trw_session_start() — loads prior learnings and any active run state.
  2. Do the work. Checkpoint after each milestone so you can resume after compaction.
  3. trw_learn(summary, detail) whenever you discover a non-obvious gotcha.
  4. trw_build_check() then trw_deliver() to persist state for the next session.

Differences from Claude Code

  • MCP lives in .gemini/settings.json. Gemini registers the server under mcpServers in its settings file — there is no .mcp.json at the repo root.
  • One instruction file. GEMINI.md carries the ceremony protocol, similar in spirit to CLAUDE.md.
  • Agent teams are a subset. Not all 12 Claude Code specialists translate cleanly to .gemini/agents/; expect the core roster plus any specialists Gemini can host.
  • Same memory store. Learnings captured here are visible to every other TRW-wired client in the same repo.

Common problems

Next steps

Keep going

If you haven't installed yet, start with the quickstart. If you have, the lifecycle page explains what TRW actually does once it's running.