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

nostradiffmus

v0.1.0

Published

Predict likely bug categories from git diffs with dramatic prophecies and practical advice.

Downloads

27

Readme

🔮 Nostradiffmus

Test npm version License: MIT

Predict your next bug before it manifests.


Nostradiffmus reads your recent git diffs, predicts the most likely bug category you're about to introduce, and delivers an absurdly dramatic prophecy… followed by real, actionable advice.

Because sometimes the future of your code is already written in the diff.

✨ What It Does

Nostradiffmus analyzes:

Recent commits or staged diffs

File change patterns

Structural code shifts

Async and state mutations

Test coverage drift

It then:

Predicts the most likely bug category

Generates a dramatic prophecy

Provides grounded technical guidance

📸 Example Output

Tragic Tone (Default)

🔮 Consulting the sacred diff scrolls...

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
         THE PROPHECY OF DOOM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Hark! I peer into the abyss of your commit,
And lo, darkness stirs within...

⚡ A race condition sleeps in asynchronous shadows,
   Waiting for the precise moment to awaken.

⚡ Promises made but not kept—error paths abandoned,
   Like a bridge half-built over turbulent waters.

⚠ Likely Bug Category: Async Race Conditions
🧠 Advice: Review promise chains and shared state updates.
📊 Confidence: 82%

JSON Output

{
  "predictedBugCategory": "AsyncStateRace",
  "confidence": 0.82,
  "signals": [
    "New async function introduced",
    "Shared mutable state detected"
  ],
  "advice": "Review promise chains and shared state updates...",
  "metadata": {
    "diffSizeChars": 2847,
    "diffSizeKB": 2.8,
    "wasTruncatedForCopilot": false,
    "filesChanged": 3
  }
}

See more examples in examples/ directory including all tone variations and different bug categories!

🚀 Why This Exists

Developers often:

Move quickly and miss subtle regressions

Refactor async logic without adjusting error paths

Modify state without rethinking side effects

Introduce edge cases when changing validation logic

Nostradiffmus acts as a lightweight, fun “pre-mortem” tool.

It’s not trying to replace tests. It’s not pretending to be a static analyzer. It’s a smart, humorous early warning system powered by pattern recognition and Copilot CLI integration.

🧠 How It Works

High level flow:

Capture diff (git diff or git diff --staged)

Extract signals:

Added/removed async keywords

State updates

Conditional logic changes

Deleted tests

Large refactors

Map patterns to bug categories

Generate:

Prophecy narrative

Concrete technical recommendation

Bug categories include:

Async Race Conditions

State Drift

Null/Undefined Access

Validation Edge Cases

Off-By-One Errors

Incomplete Refactors

Test Coverage Gaps

Configuration Regressions

🛠 Installation

Global Installation (Recommended)

npm install -g nostradiffmus

Local Development

git clone https://github.com/simandebvu/nostradiffmus.git
cd nostradiffmus
npm install
npm run build
npm link  # Use globally on your machine

NPX (No Installation)

npx nostradiffmus --staged

🏃 Usage

Run against staged changes:

nostradiffmus

Run against a specific commit:

nostradiffmus --commit HEAD~1

Run in dramatic mode:

nostradiffmus --tone tragic

Tone options:

tragic

cryptic

sarcastic

biblical

clinical

⚙️ CLI Options

| Flag | Description | | --- | --- | | --staged | Analyze staged changes only (default when no --commit is provided) | | --commit <hash> | Analyze a specific commit | | --tone <mode> | Change prophecy style | | --json | Output structured JSON (for CI integration) | | --quiet | Suppress dramatic output, show only advice (ignored when --json is set) |

⚙️ Environment Variables

Nostradiffmus can be configured via environment variables to handle large diffs:

| Variable | Default | Description | | --- | --- | --- | | NOSTRADIFFMUS_MAX_DIFF_CHARS | 500000 | Hard limit - reject diffs larger than this (in characters) | | NOSTRADIFFMUS_COPILOT_CHARS | 4000 | Maximum characters sent to Copilot for analysis | | NOSTRADIFFMUS_MAX_LINES | 10000 | Maximum lines processed during signal extraction | | NOSTRADIFFMUS_WARN_THRESHOLD | 100000 | Warn user when diff exceeds this size (in characters) | | NOSTRADIFFMUS_GIT_TIMEOUT_MS | 30000 | Git command timeout in milliseconds (30 seconds) | | NOSTRADIFFMUS_USE_COPILOT | 1 | Set to 0 to disable Copilot integration | | NOSTRADIFFMUS_DEBUG | - | Set to 1 to enable debug logging |

Example:

NOSTRADIFFMUS_WARN_THRESHOLD=50000 nostradiffmus --staged

🔌 GitHub Copilot CLI Integration

Nostradiffmus can optionally use GitHub Copilot CLI to:

Interpret diff intent in natural language

Assess architectural drift

Generate richer context-aware guidance

This makes it ideal for hackathon submissions exploring AI-assisted developer workflows.

Copilot enrichment is enabled by default when GitHub CLI Copilot is available.

If Copilot CLI is not installed or not authenticated, Nostradiffmus automatically falls back to local heuristic analysis.

To disable it explicitly:

NOSTRADIFFMUS_USE_COPILOT=0 nostradiffmus --staged

📦 Examples & Documentation

Check out the examples/ directory for:

  • Complete JSON output examples for each bug category
  • All 5 tone variations (tragic, cryptic, sarcastic, biblical, clinical)
  • Sample scenarios and use cases

🧪 Future Ideas

CI mode: fail build if risk score exceeds threshold

GitHub PR comment bot

“Prophecy Accuracy Tracker”

Team leaderboard of most foretold regressions

Historical bug prediction learning

🎯 Hackathon Angle

Nostradiffmus demonstrates:

AI-augmented developer tooling

Natural language reasoning over diffs

Preventative debugging

Creative developer experience innovation

It blends humor and utility, turning mundane code review into something memorable and shareable.

⚠ Disclaimer

Nostradiffmus does not guarantee accurate predictions.

But when it’s right… you’ll remember it.