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

tracecode

v0.1.0

Published

Understand your codebase before you change it. Local-first CLI that indexes git history and code structure to explain why code exists and what a change will break.

Readme

TRACECODE

Understand your codebase before you change it.

A local-first CLI for JS/TS developers. TRACECODE indexes your repo's git history and code structure, then answers two questions straight from your terminal:

  • tracecode why <file>:<line> — why does this code exist?
  • tracecode impact <symbol> — what will changing this break?

No code leaves your machine. No server, no account, no cloud dependency required.


Install

npm install -g tracecode

Or run without installing:

npx tracecode <command>

Quick Start

cd my-project
tracecode init                          # index the repo
tracecode why src/db.ts:42              # explain why this code exists
tracecode impact openDatabase           # see what would break

Full usage guide: docs/usage.md — all commands, flags, AI provider setup, GitHub enrichment, output formats, and troubleshooting.


Commands

| Command | Description | | ----------------------------------------- | --------------------------------------------------- | | tracecode init | Index the repository (git history + code structure) | | tracecode why <file>:<line> | Explain why a piece of code exists | | tracecode impact <symbol> | Show what could break if a symbol changes | | tracecode config set-key <target> <key> | Store API keys and tokens locally |


Development

npm install          # install dependencies
npm run dev          # run the CLI in dev mode via tsx
npm run build        # bundle to dist/ for publishing
npm test             # run all tests (unit + integration)
npm run typecheck    # tsc --noEmit

Running Tests

npm test                        # all tests
npx vitest run test/unit/       # unit tests only (fast)
npx vitest run test/integration/ # integration test (~30s)
npm run test:watch              # watch mode

Native module rebuild

better-sqlite3 ships a native C/C++ binary. If you switch Node versions after npm install, you'll see errors like NODE_MODULE_VERSION 127 ... requires NODE_MODULE_VERSION 137. Fix:

npm rebuild better-sqlite3

Project Structure

src/
├── cli/            # command entry point, command handlers, output formatting
├── ingestion/       # git log/blame parsing, optional GitHub PR/issue fetching
├── graph/           # AST parsing + dependency graph construction/query
├── store/           # SQLite schema, connection, repository layer
├── summarize/        # template-based "why" summary builder (no AI required)
└── config/           # local token storage (GitHub token, AI provider keys)

Scope

v1 ships four commands: init, why, impact, config. Includes multi-provider AI summarization (Anthropic, OpenAI, Gemini, Groq, custom endpoints), standalone HTML report export, and GitHub PR/issue enrichment. See docs/usage.md for the full feature set.

License

MIT — see LICENSE for details.