> ## 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.

# What is GitHits?

> GitHits gives AI coding agents context from public open-source software: indexed code, package docs, metadata, vulnerabilities, changelogs, and examples.

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 gives AI coding agents context from public open-source software. Agents get version-aware access to indexed code, package docs, package metadata, vulnerabilities, changelogs, dependency graphs, upgrade evidence, and real implementation examples.

GitHits builds its index on demand, in about 10 seconds for an average repo, so agents can retrieve and navigate the actual code running in your stack.

It gives them:

1. **Code Navigation** across packages and repos: search, grep, file listing, and exact line reads without cloning.
2. **Documentation Access** across hosted docs and repo-backed docs.
3. **Package Inspection** for dependencies, vulnerabilities, changelogs, dependency graphs, and upgrade changes.
4. **Code Examples** for prior art and implementation patterns from repositories, issues, discussions, and pull requests.

## 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 context from public open-source software. Code Navigation, Documentation Access, and Package Inspection are version-aware when you target a package or repo version. Code Examples are for prior art and current implementation patterns when you do not need a version-pinned source inspection.

## How it works

GitHits runs through a hybrid CLI that configures a local [MCP server](https://modelcontextprotocol.io/) for your AI coding tool. Once connected, your agent can call GitHits tools when it needs context from indexed public open-source code, package docs, package metadata, or examples. If your harness is conservative about tool use, you can [trigger GitHits manually](/guides/trigger-githits).

```bash theme={null}
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 context categories, plus feedback.

### Code navigation

Search, grep, list files, and read exact line ranges across indexed packages and repositories without cloning.

| Tool            | What it does                                                                |
| --------------- | --------------------------------------------------------------------------- |
| `search`        | Unified indexed search across dependency/repository code, docs, and symbols |
| `search_status` | Follow up a prior indexed search by `searchRef`                             |
| `code_files`    | Discover what files a dependency or repo contains                           |
| `code_read`     | Read a dependency file by path                                              |
| `code_grep`     | Deterministic text grep across indexed dependency or repo files             |

### Documentation access

Search, browse, and read hosted docs and repo-backed docs for indexed packages.

| Tool        | What it does                                                       |
| ----------- | ------------------------------------------------------------------ |
| `search`    | Find documentation pages by topic, API, option, behavior, or error |
| `docs_list` | Browse mixed package documentation pages                           |
| `docs_read` | Read a documentation page by page ID                               |

### Package inspection

Inspect dependencies, vulnerabilities, changelogs, and upgrade changes.

| Tool                 | What it does                                                                                                                             |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `pkg_info`           | Package triage: version, license, repository popularity, downloads, vulnerabilities                                                      |
| `pkg_vulns`          | CVE / OSV advisories for a package or specific version                                                                                   |
| `pkg_deps`           | Direct dependencies, dependency groups, and optional transitive graph                                                                    |
| `pkg_changelog`      | Release notes and changelog entries for a package or GitHub repo, including version ranges for upgrade review                            |
| `pkg_upgrade_review` | Current-vs-target upgrade evidence from vulnerabilities, changelogs, deprecation data, peer dependencies, and optional transitive checks |

### Code examples

Find prior art and implementation patterns from real repositories, issues, discussions, and pull requests when you need existing approaches instead of a version-specific inspection.

| Tool              | What it does                                                                 |
| ----------------- | ---------------------------------------------------------------------------- |
| `get_example`     | Find implementation examples by describing what you need in natural language |
| `search_language` | Look up supported programming language names                                 |

### Feedback

Report whether results helped, either tied to a specific `solution_id` or as generic tool feedback.

| Tool       | What it does                                                |
| ---------- | ----------------------------------------------------------- |
| `feedback` | Submit 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, Pi, Gemini CLI, Google Antigravity, and OpenCode. For any MCP-capable client that supports remote servers, use [Manual remote MCP setup](/installation/manual-setup).

## Next steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Connect GitHits with the hybrid CLI.
  </Card>

  <Card title="Code Navigation" icon="magnifying-glass" href="/tools/code-navigation">
    Inspect packages and repos, read source files, and grep indexed code.
  </Card>

  <Card title="Package Inspection" icon="package" href="/tools/package-inspection">
    Review metadata, vulnerabilities, dependencies, changelogs, and upgrade evidence.
  </Card>

  <Card title="Skills" icon="graduation-cap" href="/installation/skills">
    Use CLI-backed Skills instead of MCP tools.
  </Card>
</CardGroup>
