The Problem
Developers run multiple local servers simultaneously. A database API on one port, a frontend dev server on another, maybe a worker process on a third. But what's actually running? Which processes are healthy? Which ones are consuming resources they shouldn't?
The default tools — checking port status, looking at terminal output, restarting processes blindly — are fragile and error-prone. On Windows, this is especially painful. The native process management tools are different from Linux, the port conflict resolution is less straightforward, and the risk of accidentally killing the wrong process is real. There's a gap between "something is running on localhost" and "this service is healthy and I understand what it's doing."
The Build
Localhost Watchdog is a Windows-first tool designed to fill that gap. It's built as three components working together: a scanner that discovers what's running, a classifier that identifies and categorizes each process, and a process manager that can act on what it finds — but only when it's confident and you've confirmed.
Architecture
- Scanner: Discovers active processes on all local ports, mapping PIDs to services and collecting resource usage data
- Classifier: Identifies each process by type — dev server, database, API, worker — using process name, port, command line, and behavior patterns
- Process Manager: Can restart, stop, or inspect identified processes, but only through the safety model
The Safety Model
The core design principle is that no destructive action happens without explicit confirmation. Localhost Watchdog is built around a safety model that prevents accidental damage:
Safety Guarantees
- Dry runs: Every action is previewed before execution. You see exactly what will happen — which process will be stopped, which port will be freed — before it happens
- Confidence gates: Actions only proceed when the classifier's confidence exceeds a threshold. Low-confidence identifications are flagged, not acted on
- PID/port revalidation: Before any action, the tool rechecks that the target process still exists at the expected PID and port. Stale references are caught, not trusted
- Test-first execution: The scanner runs a lightweight validation pass before and after any management action, confirming the system state matches expectations
- No destructive action without confirmation: Stop, restart, and kill operations require explicit user confirmation, even when confidence is high
Why Windows-First
Most developer tools assume a Unix-like environment. Port management, process handling, and system monitoring all have different APIs and different failure modes on Windows. Localhost Watchdog is designed for the Windows development experience first — native process APIs, PowerShell-compatible output, Windows-specific port conflict resolution.
This doesn't mean it can't work elsewhere. The architecture is designed to be platform-aware, with the safety model being universal. But the initial implementation targets the environment where the pain is most acute: developers running Node.js servers, Docker containers, and local databases on Windows machines.
Current State
Localhost Watchdog is in active development. The scanner and classifier work — they can discover running processes, map ports to PIDs, and categorize services by type. The process manager's safety model is implemented but still being hardened.
The biggest challenge is the classifier's confidence accuracy. Process identification on Windows is noisy — multiple processes can bind to adjacent ports, command-line arguments vary between environments, and some services don't identify themselves clearly. The confidence gates are doing their job: catching uncertain identifications instead of acting on them blindly.
Lessons Learned
The most interesting discovery is how much uncertainty developers live with when working locally. "Is this service running?" seems like a simple question, but the answer is often more complex than a yes/no. The process might be running but unresponsive. It might be bound to the right port but serving stale data. It might be a zombie process from a previous session.
Another insight: the safety model is more valuable than the management features. The dry-run preview and confidence gates catch mistakes that would otherwise require manual recovery. The tool's primary value isn't that it can stop a process — it's that it won't stop the wrong one.
Status: Active Experiment (WIP)
Localhost Watchdog is being actively developed and tested on Windows. The scanner and classifier are functional. The process manager safety model is being hardened. No public release planned yet — this is work-in-progress.