GitHits works by running a local MCP server that your AI coding tool starts on demand. Install it through the hybrid CLI: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.
Check prerequisites
GitHits requires Node.js 24 or later. To check your version, run:If you need to install or upgrade Node.js, visit nodejs.org.
Run the hybrid CLI
From your terminal, run:This command:
- Detects supported AI coding tools installed on your machine
- Configures each detected tool with the GitHits MCP server
- 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.
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:For example, if you ask your agent to implement HTTP retries with exponential backoff in Python, it may issue a The agent receives a source-cited, canonical example and uses it to guide its implementation.
get_example call behind the scenes:What’s next
- Learn where GitHits fits in an agentic coding workflow
- Learn how to trigger GitHits manually
- Review Automatic Setup for the Local MCP install path
- Add GitHits to an unsupported MCP client with manual setup
- Use GitHits through Skills if you prefer Skills over MCP
- Browse the code examples tools to understand what your agent can search for
- Explore code navigation tools for source reading
- Explore documentation access tools for hosted and repo-backed docs
- Explore package inspection tools for vulnerabilities, dependencies, and changelogs