Skip to main content

Step 0 — Install the CLI

Prerequisite: You need the git-why CLI installed before continuing. Install it here →

Step 1 — Set up GitWhy

Run the setup wizard:
You’ll see a multi-select menu:
Select MCP + Skill files for Claude Code, Cursor, and most MCP-capable agents. Use arrow keys to move, Space to toggle, Enter to confirm.

Step 2 — Work and commit

Work on a feature with your coding agent and make a few commits.

Step 3 — Save the session

When you’re done, tell your agent:
The agent generates a structured context, then saves it:
That first save also prepares .git/gitwhy/ and installs the post-commit hook for future commits in the repository.

Step 4 — Browse locally

Step 5 — Share with your team

Your context is saved locally. Share it with your team in two ways:
Post a structured context comment on your GitHub pull request:
Reviewers see the reasoning behind your changes directly on the PR.See the PR Comments guide and CLI reference for full options.

What’s next

Context format

Understand the template your agent fills out.

CLI reference

Full documentation for all commands.