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

graphify-chokidar

v0.1.2

Published

Keeps your graphify knowledge graph fresh without burning tokens.

Downloads

402

Readme

graphify-chokidar

Keep your graphify knowledge graph fresh — automatically, without burning tokens.

◆ watching . — ignoring graphify-out/ node_modules/
◆ debounce 2000ms

~ changed src/auth/session.ts
↻ running graphify .
✓ graph rebuilt in 1.4s

~ changed docs/architecture.md
⚠  LLM rebuild triggered — these files will consume tokens:
  docs/architecture.md
  run graphify? [Y/n]

Why

graphify builds a knowledge graph from your codebase. But re-running it manually after every change is friction. graphify-chokidar handles all of that — including the very first build.

No graph yet? Save any file and it builds one from scratch.
Graph already exists? It updates only what changed.
Code change (.ts, .py, .go, …) → rebuilds instantly, no prompt, no LLM call.
Doc/media change (.md, .pdf, .png, …) → asks first, then rebuilds with LLM.

If a new change arrives mid-build, the previous build is cancelled and a fresh one starts immediately — but repeated LLM rebuilds are collapsed so you never get spammed with confirmation prompts.


Install

npm install -g graphify-chokidar

Requires graphify to be installed and on your $PATH.


Usage

# Watch current directory
graphify-chokidar

# Watch a specific path
graphify-chokidar ./src

# Custom debounce (wait 500ms after last change)
graphify-chokidar --debounce 500

# Suppress all output except errors
graphify-chokidar --silent

# Run once on next change, then exit (useful in CI)
graphify-chokidar --once

All options

| Flag | Default | Description | |---|---|---| | [path] | . | Directory to watch | | -d, --debounce <ms> | 2000 | Wait after last change before rebuilding | | -s, --silent | false | Only log errors | | --once | false | Exit after the first rebuild (CI mode) |


How it works

File change detected
      │
      ▼
  classifyFile()
      │
      ├─ ignore  →  do nothing
      │
      ├─ ast     →  cancel any running build → run graphify update <path>
      │              (no LLM, instant, safe to interrupt)
      │
      └─ llm     →  if build running: skip
                    else: prompt → run graphify update <path>

AST files (code): .ts .tsx .js .jsx .py .go .rs .java .c .cpp .cs .rb .swift .kt .scala .php .lua .zig .ex .vue .svelte .dart

LLM files (docs/media): .md .mdx .txt .rst .pdf .png .jpg .svg .mp4 .mp3 and more

Ignored always: graphify-out/ node_modules/ .git/ dist/ __pycache__/


Debouncing

Changes are batched. If you save 10 files in quick succession, one rebuild fires — not ten.

save fileA  →  start 2s timer
save fileB  →  reset timer
save fileC  →  reset timer
              ... 2s of silence ...
              → rebuild([fileA, fileB, fileC])

Adjust with --debounce <ms> to match how fast your editor flushes writes.


Agent skill

graphify-chokidar ships with a SKILL.md that lets AI agents (Claude, Codex, etc.) invoke the watcher as a slash command.

Install for Claude Code:

# Install globally first (if not already)
npm install -g graphify-chokidar

# Copy SKILL.md into Claude's skills directory
mkdir -p ~/.claude/skills/graphify-chokidar
cp "$(npm root -g)/graphify-chokidar/SKILL.md" ~/.claude/skills/graphify-chokidar/SKILL.md

Then in any Claude Code session:

/graphify-chokidar ./src

The agent will start the watcher, explain the log symbols, and handle start/stop for you.


Build from source

git clone https://github.com/yetanotheraryan/graphify-chokidar
cd graphify-chokidar
npm install
npm run build        # outputs to dist/

License

MIT