Detect and kill lingering dev server processes.
Run directly with npx:
npx dev-cleanOr install globally:
npm i -g dev-clean# Scan current directory for dev processes and kill them
dev-clean
# Skip confirmation prompt
dev-clean --yes
# Scan a specific project directory
dev-clean --cwd ~/projects/my-app
# Find processes on specific ports
dev-clean --port 3000| Option | Alias | Description |
|---|---|---|
--cwd <path> |
Target project path (default: current directory) | |
--port <ports> |
-p |
Port(s) to check (e.g. 3000, 3000-3005, 3000,5173) |
--yes |
-y |
Kill without confirmation |
--json |
Output as JSON (to stdout) | |
--dry-run |
Detect only, don't kill | |
--version |
-v |
Show version |
--help |
-h |
Show help |
dev-clean --port 3000dev-clean --port 3000,5173dev-clean --port 3000-3005dev-clean --cwd ~/projects/my-appdev-clean --dry-rundev-clean --json --yes- Windows
- macOS (unverified)
- Linux (unverified)
Requires Node.js >= 18.3.0.
MIT