DevPilot Puts a Kill Switch for Orphaned Dev Ports in Your Mac Menu Bar
Lately, I've been using AI coding tools more and more, and one obvious side effect is that local development ports are becoming increasingly chaotic.
Ask an agent to run a frontend project, and it might start on 5173.
Ask an agent to spin up a backend service, and it might leave 3000 or 8080 running.
After a few more tasks, the terminal is closed, but the service isn't, and the port is still occupied.
The next time you start a project, the familiar error appears:
address already in use
Then it's back to the old routine:
lsof -i :3000
kill -9 <pid>
If it only happened occasionally, it wouldn't be a big deal. But now that AI agents often run tasks in parallel, local ports can easily turn into a battlefield.
So I built a small tool: DevPilot.
What is DevPilot
DevPilot is a macOS menu bar port monitoring tool.
It directly displays the ports currently being listened on locally, including:
- Port number
- Protocol
- Process name
- PID
- User
- Project path
- Parent process info
You no longer need to manually run lsof or search through a bunch of terminal windows to find which service is still alive.
Click the menu bar, and you can see which development services are currently running on your machine.
The Core Problem It Solves
DevPilot mainly solves one problem:
Too many local development services, opaque port occupation, and high cleanup costs.
This problem becomes even more obvious now that AI coding tools are widely used.
For example:
- An agent starts a service but doesn't shut it down after the task ends
- Multiple projects use the same port
- The terminal window is closed, but the process is still running in the background
- You want to know which project a certain port belongs to
- You want to quickly shut down unnecessary local services
Previously, these things all required command-line troubleshooting.
Now, you can do it directly from the menu bar.
Project Service Filtering
DevPilot doesn't just dump all ports in one list.
It distinguishes between "Project Services" and "All Ports."
Project services generally refer to services started during local development, such as:
- Vite / Next.js / Nuxt
- Node.js services
- Go / Rust / Python backends
- Local API services
- Database proxies or development tool processes
This way, when you open it, you aren't overwhelmed by system services and background processes, allowing you to see the ports actually related to development more quickly.
One-Click Service Shutdown
When you see an unnecessary port, you can shut it down directly.
No more manually looking up the PID or copying commands.
Right-click the port and close the service.
DevPilot terminates the corresponding process based on the PID, which is suitable for cleaning up those local development services you no longer need.
This is very useful for people who frequently work on multiple projects and multiple AI agent tasks simultaneously.
Displaying Project Paths
For many port occupation issues, the troublesome part isn't the port number itself, but:
Which project actually started this service?
DevPilot tries to display the project path where the process resides.
When you see a 3000, 5173, or 8080, you can directly determine which project it belongs to, rather than just seeing an isolated PID.
This is much more practical than a simple port list.
Installation
If you use Homebrew, you can install it directly:
brew install --cask pkc918/tap/devpilot
You can also download the DMG from GitHub Releases:
https://github.com/pkc918/DevPilot/releases
Who It's For
If you are a macOS user and fit any of the following situations, DevPilot should be very handy:
- Frequently run multiple frontend/backend projects simultaneously
- Frequently encounter port occupation issues
- Frequently use AI coding agents
- Don't want to repeatedly type
lsof/kill - Want to know which project is occupying a local port
- Like keeping development utility tools in the menu bar
Finally
DevPilot is not a complex, large-scale tool.
It focuses on just one thing:
Letting developers see and clean up local development ports faster.
AI coding has sped up how we start projects, but it has also made it easier for various services to linger in the local environment.
What DevPilot aims to patch is this small piece of the experience: making port status visible and making cleanup fast enough.
Project address:
https://github.com/pkc918/DevPilot
Feel free to try it out, and feedback is welcome.
Top 6 of 10 from juejin.cn, machine-translated. The original thread is authoritative.
I had no idea my computer had so many ports [shy]
Nice ports
It even dug up the port number of a project I had AI write half a year ago
Shows it's really good, hahaha [grin]
This is genuinely useful, looking forward to a Windows version
It'll come later
Installed, it's indeed easy to use, thanks to the blogger for sharing
Glad it helps
[rose]
Welcome to star 👏