Every codebase is haunted. Functions nobody calls. Dependencies installed years ago and never imported. TODOs older than the developers who wrote them. Files nothing imports at all.

Repo Exorcist is a haunted-codebase inspector for JavaScript/TypeScript repos. Point it at a local repo folder and it returns:

  • a hauntedness score (0–100) — "Mildly Haunted", "Quite Haunted", etc.
  • 13 ghosts on its own haunted fixture: 4 dead code, 3 zombie dependencies, 4 haunted TODOs, 2 ghost files — each with a file, line, symbol, and an epitaph ("neverCalled has been dead since before anyone can remember — no reference found across the entire codebase.")
  • an exorcism patch — a real unified diff, verified with git apply --check — or a pull request opened from the dashboard (branch exorcist/, token held in memory for one request only, never stored or logged).

How it finds them (no regex): the engine walks the real TypeScript compiler API import graph — 8 import forms, entrypoint exclusions — and ages TODOs with git blame (180+ days = haunted). Epitaphs are templates by default, with an optional rewrite via OpenRouter free models (silent fallback to templates when no key is set).

Two interfaces, one engine: a spooky Vite + React dashboard (score gauge, ghost cards, type/severity filters, patch download, PR modal) backed by a tiny Node API server, and a CLI (--json, --patch, --fail-over exit codes 0/1/2/3) for CI gates. Monorepo: apps/web, packages/engine, packages/cli. 83 tests passing (including a snapshot test pinning the full haunted-fixture report and a blame-metadata fallback test for hosts without git), tsc clean, build green on a clean checkout.

Built With

Share this project:

Updates

Submission history