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

tracefile

v0.1.1

Published

Show why a file exists: git history, who imports it, and how it's grown over time.

Readme

tracefile

A CLI that tells you why a file exists: when it was created, who created it, who currently imports it, and how it's grown over time.

Why?

Structure tools (import graphs, dependency analyzers) tell you what connects to what. They don't tell you the story behind a file: who wrote it, when, whether it's actually used anymore, or whether it's quietly ballooned into something that needs splitting. tracefile combines git history with your project's real import graph to answer "why does this file exist, and is it still earning its place?" in one command.

Installation

npm install -g tracefile

Or run without installing:

npx tracefile <file>

From source (for contributing)

git clone https://github.com/codebyrashel/tracefile.git
cd tracefile
npm install
npm run build
npm link

Usage

tracefile <file> [options]
  • <file> - required, path to the file to audit
  • --tsconfig <path> - optional, defaults to ./tsconfig.json
  • --json - output machine-readable JSON instead of formatted text, for scripting or CI

Examples:

# Audit a file in the current project
tracefile src/services/payment.ts

# Use a tsconfig in a different location
tracefile src/utils/helpers.ts --tsconfig ./packages/api/tsconfig.json

# Get JSON output
tracefile src/services/payment.ts --json

Example output

$ tracefile src/analyzers/git-history.ts

📄 src/analyzers/git-history.ts

Created:        Aug 10, 2026 by codebyrashel
Last modified:  Aug 10, 2026 by codebyrashel
Commits:        2
Growth:         38 → 43 lines ↑

Used by (2):
  src/cli.ts
  src/analyzers/git-history.test.ts

What it checks

  • History - when the file was first committed and by whom, when it was last modified and by whom, and total commit count (via git log)
  • Growth - line count at first commit vs. current line count on disk
  • Used by - every other file in the project that currently imports this one (via TypeScript's real import graph, not text search)

Known limitations

  • Single-file scans only. tracefile audits one file per run - no directory-wide or "audit everything" mode yet.
  • No commit message summarization. The tool reports when and by whom a file changed, not why in prose - reading the actual commit messages/diffs is still on you. A future version could summarize this, but that's a meaningfully bigger feature (real diff/message analysis) deliberately left out of v1.
  • Renamed/moved files may lose early history. Git's rename detection is heuristic, not guaranteed - a file that was renamed or moved may show a shorter history than its true lifetime if git didn't track the rename as a rename.
  • Requires the file to be part of the TypeScript project. If a file isn't included by the given tsconfig.json (wrong --tsconfig path, or excluded via tsconfig's own include/exclude), the "Used by" section can't be computed.

License

ISC