Animated GIF showcasing a dynamic, textured dark background with subtle patterns.

GitHits CLI

We just pushed a big update! GitHits now does a lot more than code examples.

GitHits used to provide grounded examples of how something has been done before. Now it can also be used for more fine-grained discovery on code and documentation.

To install:

npx githits@latest init

That one command detects your tools, walks you through login if you need an account, and configures the MCP server to work with your agent harnesses. No waitlist. Anyone can sign up now, either right from the CLI or from githits.com.

From 3 tools to 14

Your agent now gets 14 tools instead of 3. All new tools ship through the GitHits CLI.

Here's what we had before in the code example tool:

get_example

Natural-language query, returns a code example sourced from global open-source. Supports 800+ languages.

New: query can be made without providing a language. The system will select a language based on the input and the sources.

search_language

Discover supported languages for get_example and their canonical names.

feedback

Submit thumbs up or down for an example or in general for a session. Has also optional text feedback and tool name parameters.

What's new: Code Navigation

Code Navigation consists of search and inspection tools.

1/ Code and Documentation Search for Open-Source

7 new tools for searching, grepping, listing, and reading code and docs in any open-source package.

search

Search across code, docs, and symbols in any package or GitHub repo. Supports discovery syntax with AND/OR, qualifiers (kind:, category:, path:, lang:), and scoped targets (npm:react, https://github.com/org/repo).

code_grep

Deterministic text grep over indexed source files. Literal or regex, scoped by path/globs/extensions. Matches chain directly into code_read.

code_files

List files in any indexed dependency or repo. Filter by path prefix, globs, extensions, language, or file intent (production, test, example, etc.).

code_read

Read source files directly. Your agent can jump to exact line ranges from search or grep results. No cloning required.

docs_list

List available documentation pages for a package (hosted + repo-backed).

docs_read

Read a single doc page by pageId.

search_status

Poll the status of asynchronous indexing or search progress. Useful when an index is still being built.

GitHits indexes open-source packages fast (around 10 seconds for average repos and 2-5 minutes for large repos like Linux kernel) and makes code accessible to agents with sub-second queries.

20+ Supported languages: Bash, C#, C++, CSS, Dart, Elixir, Erlang, Go, Java, JavaScript, Kotlin, Lua, Markdown, PHP, Proto, Python, R, Ruby, Rust, Scala, SCSS, Swift, TypeScript, Zig. If you have a suggestion on what we should add next, let us know.

2/ Package Inspection

4 new tools for inspecting a package's metadata, dependencies, vulnerabilities, and changes.

pkg_info

Package overview (version, license, downloads, stars, recent changes).

pkg_deps

Dependency graph analysis with transitive resolution and conflict detection.

pkg_vulns

Known vulnerability check with severity filtering.

pkg_changelog

Release notes, newest-first, with range queries.

Package Inspection supports 11 registries: npm, pypi, hex, crates, vcpkg, zig, nuget, maven, packagist, rubygems, go. If you have a suggestion on what we should add next, let us know.

Why it matters

Before this update, GitHits answered one question for your agent: "How has this been done before?" The agent got real implementations distilled from open-source code.

That worked for common patterns. It left a gap when the answer required understanding how a package actually works internally: which functions exist, which calls what, and how a specific version handles an edge case.

For that, your agent fell back on web searches and GitHub reads, usually pulling code from main instead of the version you've actually installed. That's how you get invented APIs, confidently wrong fixes, and retry loops.

This update closes that gap. Your agent can now navigate any indexed package's source on demand. Read source files at exact line ranges, grep across a dependency, inspect transitive deps, check vulnerabilities, follow changelogs. Correctly versioned against what you've installed. No cloning required.

Together with the existing example pipeline, your agent now has both halves of the picture: how something has been done before, and how the code you're working with actually works.

Feedback welcome. Open an issue on GitHub or drop a message in our GitHits Community Group.

Try it out

Ask your agent to use GitHits to explore https://github.com/postgres/postgres and explain how the query planner selects join strategies. It'll search the codebase, read the relevant source files, and walk you through the answer without cloning anything.

What's coming next

Some of the features we're building:

symbol_callees

Provide call graph for the symbol allowing agents to quickly understand flow through functions cross-packages

version_diff

Allow agents to see what really changed between the versions and not just what is written to change logs

➜ Which of these would bring the most value for you? Or something else? Tell us!

Baseline Skill Template

Several of you have asked for a starter skill that teaches agents how to use GitHits tools without writing your own prompt instructions. We're working on it.