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.

Your agent can grep, glob, and read your local codebase, but it cannot do the same thing across the open-source code your app depends on. That is where it breaks: niche integrations, undocumented APIs, version-specific behavior, and dependency internals. It starts guessing, retries small changes, then pushes you back into search, docs, forums, and trial-and-error. GitHits builds an index of open-source code on demand, in about 10 seconds for an average repo. Agents can retrieve current examples from GitHub and navigate version-aware dependency code instead of relying on stale memory.

The problem GitHits solves

AI coding agents are strongest when they can inspect the system in front of them. Locally, they can search your files, read exact lines, and follow definitions. Across dependencies, they usually lose that ability. Package docs may be incomplete. APIs change by version. Internals are rarely documented. Many useful patterns live in real implementations, issues, discussions, and pull requests rather than in official guides. GitHits bridges that gap with searchable open-source context. Code Examples use the latest GitHub data. Code Navigation and Package Inspection are version-aware when you target a package or repo version.

How it works

GitHits runs through a hybrid CLI that configures a local MCP server for your AI coding tool. Once connected, your agent can call GitHits tools when it needs source-backed context. If your harness is conservative about tool use, you can trigger GitHits manually.
npx githits@latest init
init detects supported coding tools installed on your machine and configures each one with the GitHits MCP server. Authentication is handled automatically for common local setup, so you usually do not need to think about it.

MCP tools

GitHits exposes MCP tools organized into four categories.

Code examples

Find implementation patterns based on the latest GitHub data from real repositories, issues, discussions, and pull requests, linked back to source code.
ToolWhat it does
get_exampleFind canonical code examples by describing what you need in natural language
search_languageLook up supported programming language names

Code navigation

Search, grep, list files, and read exact line ranges across indexed packages and repositories without cloning.
ToolWhat it does
searchUnified indexed search across dependency/repository code, docs, and symbols
search_statusFollow up a prior indexed search by searchRef
code_filesDiscover what files a dependency or repo contains
code_readRead a dependency file by path
code_grepDeterministic text grep across indexed dependency or repo files

Documentation access

Read hosted docs and repo-backed docs for indexed packages.
ToolWhat it does
docs_listBrowse mixed package documentation pages
docs_readRead a documentation page by page ID

Package inspection

Inspect dependencies, vulnerabilities, changelogs, and upgrade changes.
ToolWhat it does
pkg_infoPackage triage: version, license, repository popularity, downloads, vulnerabilities
pkg_vulnsCVE / OSV advisories for a package or specific version
pkg_depsDirect dependencies, dependency groups, and optional transitive graph
pkg_changelogRelease notes and changelog entries for a package or GitHub repo, including version ranges for upgrade review

Feedback

Report whether results helped, either tied to a specific solution_id or as generic tool feedback.
ToolWhat it does
feedbackSubmit result or session feedback to improve future quality

Automatic install support

npx githits@latest init supports automatic install for Claude Code, Cursor, Windsurf, VS Code / Copilot, Cline, Claude Desktop, Codex CLI, Gemini CLI, Google Antigravity, and OpenCode. For any tool not on this list, use the manual MCP setup guide.

Next steps

Quickstart

Connect GitHits with the hybrid CLI.

Code Examples

Learn how your agent searches for canonical patterns from real open-source repos.

Code Navigation

Inspect packages, read source files, and query changelogs and advisories.

Skills

Use GitHits through Skills instead of MCP.