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

@sajurjyabora/devdoctor

v0.1.1

Published

Documentation drift detector — finds places where your README no longer matches your code.

Downloads

230

Readme

devdoctor 🩺

devdoctor.netlify.app · Documentation drift detector. Your README was true once. devdoctor finds the places where it stopped being true — broken links, commands that no longer exist, examples that import functions you deleted last quarter.

It finds real bugs

This is devdoctor running against dotenv — the package with 120 million weekly downloads that half the JavaScript world loads its secrets with:

$ devdoctor check-docs ../dotenv

  devdoctor · check-docs ../dotenv

  🔗 Broken internal links (2)
  ──────────────────────────────────────────────────────────
   BROKEN  README.md:67
           anchor "#how-do-i-use-dotenv-with-import"
           doesn't match any heading in this file
   BROKEN  README-es.md:65
           anchor "#como-uso-dotenv-con-import"
           doesn't match any heading in this file

  ────────────────────────────────────────────────────────────
  2 issues (2 broken) · 6 markdown files · 525ms

Verify it yourself in ten seconds: open dotenv's README, find Import with ES6 near the top, click it. Nothing happens — the FAQ heading it points to no longer exists in the file. Same story in the Spanish translation, and devdoctor found both in half a second.

Zero config. No network. Nothing in the scanned repo is ever executed — code blocks are parsed, never run.

Quick start

npx @sajurjyabora/devdoctor check-docs            # check the current directory
npx @sajurjyabora/devdoctor check-docs ../repo    # check another repo
npx @sajurjyabora/devdoctor check-docs --json     # machine-readable output

Or install it globally and use the short command:

npm install -g @sajurjyabora/devdoctor
devdoctor check-docs

Exit code 0 when docs are clean, 1 when drift is found.

Use it in CI

Drop this in .github/workflows/devdoctor.yml and drifted docs fail the build:

name: docs

on:
  push:
    branches: [main]
  pull_request:

jobs:
  check-docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npx @sajurjyabora/devdoctor check-docs

What it catches

| Detector | Example finding | |---|---| | 🔗 Broken internal links | [config guide](docs/config.md) → file was moved | | ⌨️ CLI drift | README says mytool deploy --minify, the CLI defines neither | | 🧪 Code blocks that don't parse | JS/TS checked with Babel, Python with your local interpreter | | 🏷️ Stale versions | README pins [email protected], package.json says 3.1.0 | | 📦 Dead imports in examples | import { destroyWidget } from 'yourpkg' → export no longer exists |

Every finding comes with file, line number, and — when devdoctor can guess — a did you mean …? hint.

How it works

  • Markdown is parsed to an AST with remark — links, headings, code fences, and inline code with exact positions.
  • CLI definitions are recovered from package.json bin entries plus commander/yargs (JS) and click/argparse (Python) patterns in the source, then diffed against every documented invocation.
  • JS/TS snippets are parsed with @babel/parser; Python snippets are compiled in a single local python subprocess (skipped when Python isn't installed).
  • Doc snippets are treated as fragments, not programs: indented excerpts are dedented, decorator-only blocks get a stub body, and blocks containing ... placeholders or >>> REPL transcripts are left alone.

What it deliberately ignores

  • External URLs (that's a job for a link checker with a network budget)
  • CHANGELOG / HISTORY / release-notes files — old versions live there on purpose
  • Version ranges (^1.2.0) and other projects' versions in prose
  • Imports of third-party packages in examples

Requirements

Node.js 18.11+. Python 3 on PATH is optional and only used to validate Python code blocks.

License

MIT