AI Agent Hub
Back to plugins
🧩

dsh-port-guard

admin-security Updated 2026.08.14

Run the following command in DeepSeek Harness:

dsh plugin install PangYiMing/dsh-port-guard

Paste the following prompt into your AI chat to install this plugin:

Install the plugin in DeepSeek Harness by running dsh plugin install PangYiMing/dsh-port-guard; the source repository is at https://github.com/PangYiMing/dsh-port-guard.

About this plugin

EADDRINUSE is the most familiar error before any dev server starts and the easiest one to react to by blindly killing the occupying process. dsh-port-guard pushes back on that instinct: a port in use does not automatically mean it should be killed. A leftover dev server from a previous session should be reused, a process belonging to another project should be bypassed with a different port, and only a confirmed zombie deserves a precise PID kill. Identify first, act second.

The plugin begins with forensics: it prints the full identity of the occupying process, including PPID, tty, file-descriptor targets, elapsed time, and memory footprint. A PPID of 1 signals an orphan adopted by launchd; an empty tty means nobody is running it interactively; fds pointing at a .log file are the fingerprint of a nohup-launched agent or script. Read these clues together and the right course of action becomes clear.

Safety rules are explicit: never run killall node, never touch PIDs below 100, never kill a process belonging to another project, and never act when the command line is unclear. Every action targets a precise PID so unrelated services stay untouched.

Built for front-end and full-stack developers who juggle multiple projects, teams that batch-launch dev servers through agent scripts, and anyone who does not want a single port conflict to take down a service still in use.

Use Cases

  • Resolving EADDRINUSE before starting a dev server
  • Rapid triage of port conflicts in multi-project workflows
  • Cleaning up zombie processes left by agent-launched services

Best For

  • Front-end and full-stack developers juggling multiple projects
  • Teams managing dev servers via agent scripts at scale
  • Developers who prioritize process safety over blind killing