跪拜 Guibai
← Back to the summary

DevPilot Puts a Kill Switch for Orphaned Dev Ports in Your Mac Menu Bar

image.png

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:

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.

image.png

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:

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:

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:

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.

Comments

Top 6 of 10 from juejin.cn, machine-translated. The original thread is authoritative.

similar

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

青椒肉丝_  · 1 likes

Shows it's really good, hahaha [grin]

德莱厄斯

This is genuinely useful, looking forward to a Windows version

青椒肉丝_

It'll come later

书包杜711

Installed, it's indeed easy to use, thanks to the blogger for sharing

青椒肉丝_

Glad it helps

oke

[rose]

青椒肉丝_

Welcome to star 👏