nextdoctor

nextdoctor dev

Wraps your actual dev command (default npm run dev) and shows a live memory dashboard for the whole process tree — Next.js dev spawns worker processes, so this isn't just the root PID.

$nextdoctor dev --command "next dev" --threshold 6144 --auto-restart

In a real terminal this is a full-screen TUI — gauge, memory sparkline, per-process breakdown, and a scrolling log tail of the wrapped dev server's own output. Piped/non-TTY output (CI, | cat, log files) falls back to a plain-text renderer instead.

Options

  • --threshold <mb> — warn (and optionally restart) above this many MB (default 4096)
  • --interval <ms> — how often to sample (default 5000)
  • --auto-restart — kill and relaunch the dev server when the threshold is hit, instead of just warning

In the dashboard

  • / — switch focus between apps
  • r — manually restart the focused app
  • q — quit