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

explainwatch

v1.0.0

Published

Code change timeline generator - captures semantic history and renders documentary-style videos

Downloads

2

Readme

ExplainWatch - MVP1

A code change timeline generator that captures semantic history of a repository and renders documentary-style videos with accurate, per-change explanations.

Features (MVP1)

  • File Watching: Captures file changes with unified diffs
  • Symbol Indexing: Tree-sitter based symbol extraction for TypeScript and Python
  • Change Classification: Automatic categorization (feature, bugfix, refactor, config, etc.)
  • Noise Collapsing: Groups related changes, collapses formatting-only edits
  • Grounded Narration: Explanations tied to actual code changes with evidence
  • Video Rendering: HTML→PNG frames stitched with ffmpeg
  • Risk Detection: Flags potential security issues (hardcoded secrets, unsafe patterns)

Installation

npm install
npm run build

Prerequisites

  • Node.js 18+
  • ffmpeg (for video generation)
  • Playwright browsers (auto-installed)
# Install ffmpeg (Windows)
winget install ffmpeg

# Or with Chocolatey
choco install ffmpeg

# Install Playwright browsers
npx playwright install chromium

Usage

Start Recording

# Watch current directory
npx explainwatch start

# Watch specific repository
npx explainwatch start --path /path/to/repo

# With custom output directory
npx explainwatch start --output ./output

# Choose narration style
npx explainwatch start --style diff-first  # minimal commentary
npx explainwatch start --style narrated    # default, with explanations
npx explainwatch start --style lecture     # includes concept explanations

Press Ctrl+C to stop recording. The tool will automatically generate:

  • timeline.json - Structured event timeline
  • summary.md - Human-readable summary
  • video.mp4 - Documentary-style video
  • captions.srt - Subtitles

List Sessions

npx explainwatch list

Generate from Existing Session

npx explainwatch generate --session <session-id>

Execute Commands (Captures Output)

npx explainwatch exec npm test
npx explainwatch exec cargo build

Architecture

src/
├── types/          # Event and segment schemas (Zod)
├── capture/        # File watcher, command capture
├── analysis/       # Symbol indexer, change classifier, segmenter
├── narration/      # Script generator
├── render/         # HTML templates, video renderer
├── storage/        # Event store (JSONL + patches)
├── core/           # Session manager
└── cli.ts          # CLI entry point

Event Types

  • FileChanged - File modifications with unified diff
  • CommandExecuted - Terminal command with stdout/stderr
  • SymbolGraphChanged - Added/removed/modified symbols
  • DependencyChanged - Package manager changes

Output Formats

timeline.json

{
  "version": 1,
  "sessionId": "uuid",
  "chapters": [
    {
      "title": "Authentication",
      "segments": [
        {
          "title": "Added AuthMiddleware",
          "changeType": "feature",
          "narration": "At 03:12, new functionality was added...",
          "evidence": [{"claim": "...", "file": "...", "lineRange": [1, 10]}],
          "impactedSymbols": [{"name": "AuthMiddleware", "kind": "class"}]
        }
      ]
    }
  ]
}

summary.md

Human-readable markdown with chapters, segments, and risk flags.

Narration Styles

| Style | Description | |-------|-------------| | diff-first | Minimal - shows diffs with brief commentary | | narrated | Default - includes "what changed" and "why" explanations | | lecture | Educational - pauses to explain concepts (middleware, DI, etc.) |

Ignored Patterns

By default, these are ignored:

  • node_modules/, .git/, dist/, build/
  • .next/, __pycache__/, .venv/
  • Lock files (package-lock.json, yarn.lock, etc.)

Add custom patterns:

npx explainwatch start --ignore "*.log" --ignore "coverage/"

Limitations (MVP1)

  • Symbol indexing only for TypeScript and Python
  • No TTS audio (video has subtitles only)
  • No IDE integration (repo-only mode)
  • Requires ffmpeg for video output

Roadmap to MVP2

  • [ ] VSCode extension for agent message capture
  • [ ] TTS audio narration
  • [ ] Go/Rust symbol indexing
  • [ ] "Ask follow-up" feature
  • [ ] Multiple zoom levels (5min/30min/3hr summaries)

License

MIT