npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

githits

v0.1.3

Published

CLI companion for GitHits - code examples from global open source for developers and AI assistants

Readme

githits

Code examples from global open source for developers and AI assistants.

GitHits gives your AI coding assistant access to verified, canonical code examples drawn from all of open source. When your assistant is stuck, needs an up-to-date API example, or encounters a vague error, GitHits helps it find a working solution in seconds.

Quick Start

npx githits login

This opens your browser to authenticate with your GitHits account. Once logged in, set up your AI assistant:

Claude Code

claude mcp add githits -- npx -y githits mcp start

Cursor / VS Code

Add to your MCP settings JSON:

{
  "mcpServers": {
    "githits": {
      "command": "npx",
      "args": ["-y", "githits", "mcp", "start"]
    }
  }
}

That's it. Your assistant now has a search tool it will use automatically when it needs code examples.

How It Works

GitHits runs as an MCP server that your AI assistant connects to over stdio. The assistant gets three tools:

| Tool | Purpose | |---|---| | search | Find code examples by describing what you need in natural language | | search_language | Look up supported programming language names | | feedback | Rate search results to improve future quality |

The assistant decides when to call these tools on its own — typically when it's stuck, needs a working example for an unfamiliar API, or encounters an error it can't resolve from its training data alone.

License Filtering

Search results respect license filtering by default, excluding copyleft-licensed code. Three modes are available:

  • strict (default) — excludes copyleft licenses
  • yolo — includes all licenses, no filtering
  • custom — uses your custom blocklist configured at githits.com

Authentication

GitHits requires authentication. There are two options:

Browser Login (recommended)

npx githits login

Opens your browser for secure OAuth authentication. Tokens are stored locally and refreshed automatically on next use. If a refresh fails (e.g., after an extended idle period), run githits login again.

Useful flags:

  • --no-browser — prints a URL instead of opening a browser (for SSH sessions, CI, or headless environments)
  • --force — re-authenticate even if already logged in
  • --port <port> — use a specific port for the local callback server

API Token

For CI or environments where browser login isn't practical, set an environment variable:

export GITHITS_API_TOKEN=ghi-your-token-here

Commands

githits login          Authenticate with your GitHits account
githits logout         Remove stored credentials
githits mcp            Show setup instructions in a terminal; starts MCP server when piped
githits mcp start      Always start MCP server (for use in MCP config files)
githits auth status    Show current authentication status

Environment Variables

| Variable | Purpose | Default | |---|---|---| | GITHITS_API_TOKEN | API token for authentication | — | | GITHITS_MCP_URL | Override MCP server URL | https://mcp.githits.com | | GITHITS_API_URL | Override REST API URL | https://api.githits.com |

Requirements

  • Node.js 20 or later

License

Apache-2.0