Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.githits.com/llms.txt

Use this file to discover all available pages before exploring further.

GitHits works by running a local MCP server that your AI coding tool starts on demand. Install it through the hybrid CLI:
npx githits@latest init
This is the only installation path for the MCP server. The CLI detects supported coding tools, configures them, and handles authentication for common local setups.
1

Check prerequisites

GitHits requires Node.js 24 or later. To check your version, run:
node --version
If you need to install or upgrade Node.js, visit nodejs.org.
2

Run the hybrid CLI

From your terminal, run:
npx githits@latest init
This command:
  1. Detects supported AI coding tools installed on your machine
  2. Configures each detected tool with the GitHits MCP server
  3. Handles authentication automatically for common local setup
init supports automatic install for Claude Code, Cursor, Windsurf, VS Code / Copilot, Cline, Claude Desktop, Codex CLI, Gemini CLI, Google Antigravity, and OpenCode.
If your tool is not on this list, add GitHits manually with the same MCP server command. See the manual setup guide.
3

Use your agent

Open your AI coding tool and start a coding task as normal. Many agents call GitHits tools on their own when they need a real-world example or package context.Some harnesses are more conservative. If the agent starts guessing or does not call GitHits, ask for it directly:
Use GitHits Code Examples to find a real open-source implementation of HTTP retries with exponential backoff in Python. Use the result to guide this change.
For example, if you ask your agent to implement HTTP retries with exponential backoff in Python, it may issue a get_example call behind the scenes:
Tool call: get_example
Query: "Python HTTP retry with exponential backoff using requests"
The agent receives a source-cited, canonical example and uses it to guide its implementation.

What’s next