r/macapps • • 10d ago

Free Ports: a menu bar app that shows every local server on your Mac, the project it belongs to and what started it - Free

Post image

Hi all, I'm Miko, the developer of Ports. I built it to fix my own problem: too many dev servers running, half of them started by coding agents, and no quick way to see which one was holding which port.

Problem: Ports shows every server listening on your Mac, tells you which project it belongs to and what started it, and lets you stop or restart it in a click.

What it does

  • Finds servers by itself. There is nothing to set up or add.
  • Shows the project folder, the framework (Vite, Next.js, Rails, Postgres and about 100 others) and the launcher: your terminal, your editor, a coding agent, Docker or a launch agent.
  • Stops a server gracefully, and force-stops it only if it won't go.
  • Keeps a "recently stopped" list so you can start a server again with the same command, in your own terminal (tmux, Muxy and Herdr recipes are on the site).
  • Docker containers, databases and Laravel Valet/Herd sites are included. Type a Valet site's name in the filter to open it.
  • Watch a port to pin it and get a notification when it goes down.
  • Global shortcuts, a filter, and buttons to open the project in your editor or terminal.

Comparison: the two closest rivals are LocalPorts and Manfath.

  • LocalPorts (free, Pro $19): you add each service by hand and it then manages it. It is better than Ports at running services: live log viewer, health history, auto-restart on crash, webhooks, profiles, and it supports macOS 13+. Ports is better at discovery: it needs no setup and tells you the project, framework and launcher of servers you never registered.
  • Manfath (free, open source): also finds ports automatically. It is better at sharing: one-click Cloudflare Tunnel or ngrok, a QR code for your phone, Homebrew install, and macOS 14+. Ports goes further on context and control: what launched each server, Docker and Valet/Herd awareness, graceful stops, start again, and watched ports.

Pricing: $0, free. No account, no in-app purchases. https://ports.graffio.co

Trust: Website, https://www.linkedin.com/in/mikomagni/, https://ports.graffio.co/privacy

Signed and notarised by Apple.

Changelog: https://ports.graffio.co/changelog

My other open source work (Ports itself is closed source): https://github.com/mikomagni/

Good to know before you download

  • Requires macOS 26 and Apple silicon.
  • Not open source.
  • The app has no analytics or crash reporting. Its only outside connection is the update check.

Happy to answer questions, and bug reports are welcome at the address on the privacy page.

229 Upvotes

42 comments sorted by

•

u/macapps-ModTeam 10d ago

Hi, your app is in one of our saturated categories. These apps qualify for the main feed only through the Mac App Store, a Dev Flair, or a top 3 spot in The App Pile.

This post counts as your app post for the next 30 days. You're welcome to enter this month's App Pile. Details

13

u/filip_gl 10d ago

Very nice man, I used it and it pretty much caught everything I have.

Cheers!

3

u/AlteredStateOfMind 10d ago

Nice, if you prefer to only show actual dev servers, you can turn off the noise in settings > servers

7

u/Thiinad 10d ago

Ports 1.0.9 is rejected by macOS Tahoe 26 on an M4 Pro.

codesign --verify --deep --strict --verbose=4 /Applications/Ports.app

reports:

unsealed contents present in the root directory of an embedded framework

In subcomponent:

.../Contents/Frameworks/Sparkle.framework

spctl -a -vvv -t execute /Applications/Ports.app reports:

rejected (unsealed contents present in the root directory of an embedded framework)

Could you check and re-sign/notarize the release?

3

u/AlteredStateOfMind 10d ago

Thanks for the exact commands, that made it quick to find. You're right, and it's fixed in 1.0.10, which is up now.

The signing and notarisation were fine, the zip wasn't. It carried AppleDouble "._" files for extended attributes. Archive Utility folds those back in, but unzip and other unarchivers leave them as real files inside Sparkle.framework, which breaks the seal. That's the "unsealed contents" error you got.

1.0.10 is zipped without them, and the release script now unpacks each build with plain unzip and runs codesign and spctl on the result before it ships. I checked the live download that way: it verifies and spctl says accepted, Notarized Developer ID.

Sorry for the trouble, and thanks for reporting it properly.

1

u/Thiinad 9d ago

thanks. great app!

2

u/Difficult_Duty2198 10d ago

does it pick up servers running inside docker containers too, or just stuff started on the host? the agent-started ones sound handy

4

u/AlteredStateOfMind 10d ago

Yes, both. Any container that publishes a port to your Mac shows up as its own row with the container name, image and Compose project, and you can stop or restart the container from there. It works with Docker Desktop, OrbStack, Colima, Rancher Desktop and Podman.

The one limit: a server that only listens inside a container, with no port published to the host, won't appear, because Ports looks at what's listening on the Mac itself.

And yes, agent-started servers are what I built it for. If Claude Code or another agent starts a dev server, the row shows the launcher chain, so you can tell it apart from the one you started yourself.

2

u/indian_geek 10d ago

Any chance of open-sourcing the project? I have a great idea if you would like to implement which is to build on the new AlfredUI (introduced in Alfred 6) to view the main interface through Alfred launcher!

5

u/AlteredStateOfMind 10d ago

Thanks! No plans to open source it, I'd like to keep this one closed while I figure out where it's going.

What I do want to ship is a command line tool with the app: list your servers as a table or JSON, and stop one by port. That would let you drive Ports from Alfred, Raycast or a script without needing the source. I've built on AlfredUI before, so a proper Alfred view on top of it is something I may do later.

Would list, open and stop cover what you had in mind?

1

u/indian_geek 10d ago

Yes, just listing, starting and stopping would be a good start

2

u/South_Literature_39 10d ago

Nice, this is a real problem with agents spinning up servers everywhere. Curious about the implementation: are you reading sockets and cwd straight from libproc (proc_pidinfo / proc_pidfdinfo), or shelling out to lsof on a timer? lsof gets slow when there are a lot of processes, so I'm wondering how you keep the menu fresh without it costing battery. And for the project folder, is that just the process's working directory walked up to the nearest package.json / Gemfile / .git, or something smarter?

1

u/AlteredStateOfMind 9d ago

Straight from libproc, no lsof: proc_listallpids, then proc_pidinfo for each pid's file descriptors and proc_pidfdinfo for the listening sockets. A full pass over ~1,500 processes takes a few milliseconds. The one exception is root-owned listeners, which need a single netstat run.

For battery, the timer slows down when nobody's looking: every 1.5 s with the panel open, your chosen refresh rate when closed, 3x slower in Low Power Mode, and once a minute when the screen is locked.

Project folder is what you guessed: the working directory walked up to the nearest package.json, Gemfile, Cargo.toml, .git and so on, falling back to the script path in the command when the working directory is / or your home folder.

1

u/Ok_Woodpecker_9104 10d ago

how does it work out the launcher once the parent is gone? some of my long running scripts get started with nohup from a terminal or an agent session and then that shell exits, so the process gets reparented to launchd and the parent chain just says pid 1.

does it fall back to the cwd or env vars there, or does it show up as a launch agent? that is exactly the case where i lose track of what is holding a port

3

u/AlteredStateOfMind 10d ago

u/Ok_Woodpecker_9104 honest answer: it only half handled that, so I fixed it properly today in 1.0.9.

Until now, once the shell exited, Ports fell back to whatever macOS considers "responsible" for the process (same thing Activity Monitor shows). That survives nohup, so you'd still see iTerm or Ghostty or VS Code, but everything in between was gone. You couldn't tell if you'd started it or an agent had, which is exactly your problem.

Now it remembers the full chain from when the shell was still alive and keeps showing it after launchd takes over, something like "Ghostty › claude › npm run dev". The bits that have exited are just dimmed in the details.

On the rest: no, it won't show up as a launch agent. That label is only used when launchctl really lists the pid as a job. And the project (name, folder, git branch) comes from the cwd and the script path, not the parent, so you get that either way. Env vars aren't involved.

One catch: Ports has to be running when the server starts. If the shell was already gone before Ports first saw the process, there's nothing to remember and it falls back to the responsible app like before.

Thanks for the nudge, changelog's here: https://ports.graffio.co/changelog

1

u/linzjalinzj 10d ago

When a reloader or wrapper like uvicorn --reload, nodemon, or npm run dev spawns a child worker that owns the listening socket, does Stop signal the process group / watcher parent too, or just the socket-holding PID (which the watcher immediately respawns)?

2

u/AlteredStateOfMind 10d ago

Today it signals the process that owns the listening socket, not the group or the watcher.

I just tested it with nodemon to be sure. Stop frees the port, but nodemon is still sitting there, and the server comes back on the next file change. So for watchers whose child opens the socket by itself (nodemon, or a supervisor like pm2), it falls short.

It's better where the parent opens the socket and the worker inherits it (uvicorn --reload, gunicorn, nginx): Ports treats the parent as the owner, so Stop goes to the reloader, not the worker.

I don't want to just kill the whole process group, because that takes out siblings (think concurrently or turbo running three servers). What I'm planning instead: when the server comes back under the same parent right after a stop, offer "Stop the watcher too". Launch agents already work that way, they're unloaded rather than killed so launchd doesn't restart them.

Good catch, it's on the list.

1

u/AlteredStateOfMind 10d ago

This is in 1.0.10, out now.

When you stop a server and whatever started it is still sitting there with nothing left to run, Ports now says so and offers "Stop It Too". Tested with nodemon: stop the server, the banner appears a second later, one click and nodemon is gone too.

It deliberately stays quiet when the parent still has other children (concurrently, turbo), since stopping that would take your other servers down. And I checked npm run dev while I was at it: stopping the server ends the npm wrapper too, so no banner there.

One case still open: supervisors that respawn instantly, like pm2. The new child is already up by the time Ports looks. That one needs a different approach.

1

u/SnapState 10d ago

Does a row show the bind address/interface as well as the port? With agent-started dev servers, the difference between 127.0.0.1, ::1, and 0.0.0.0 matters a lot; a small "local-only" vs "LAN-visible" label would make it much easier to spot something accidentally exposed on a shared network.

1

u/AlteredStateOfMind 10d ago

Yes, both.

On the row there's an orange globe when a server is listening on all interfaces (0.0.0.0 or ::), so you can scan the list and spot anything open to the network. No globe means loopback only. Hover it and it says other devices can connect.

Expand the row and "Listening" shows every bound address exactly, e.g. 127.0.0.1:5173 and [::1]:5173, so you can tell v4 from v6, plus the LAN URL if it's exposed.

Your question made me check one edge: a server bound to a single LAN or VPN address (not 0.0.0.0) didn't get the globe, even though it's just as reachable. Fixed, it'll be in the next update.

Agents do love --host 0.0.0.0.

1

u/AlteredStateOfMind 10d ago

Quick follow-up: the edge case I mentioned is fixed in 1.0.10, out now. A server bound to a single LAN or VPN address gets the globe too, not just ones on 0.0.0.0.

1

u/SnapState 10d ago

Nice, thanks for checking the single-address case too. Globe for a quick scan plus exact bind addresses in the expanded row sounds like the right split. VPN-bound dev servers are exactly the easy-to-miss case.

1

u/ale_benassi 9d ago edited 9d ago

This is really really cool, and really useful in this time and age with agents leaving behind so much junk. Well done!

Would you consider adding some extra icons? There is a crazy amount of menu bar apps out there already using a circle or a circle within a circle. On my mac alone I currently have 6:

Mos - Opie - Monocle - Ports - 1Password - Loop

Edit:

Oh and it would be absolutely amazing if you implemented the tunnel feature from Manfath. That app is nice but has received only one initial release seven months ago so I'm not sure about its future.

2

u/AlteredStateOfMind 9d ago edited 9d ago

The tunnel feature is on my to do list. The icon fair point... it needs some TLC.

Edit:
u/ale_benassi Here you go: https://ports.graffio.co/#share

1

u/Agreeable_Act7083 17h ago

This fills a real gap for me. I always end up with a forgotten dev server on some port and have to hunt for it with lsof. Can it stop a server from the menu too, or does it only show them?

1

u/AlteredStateOfMind 9h ago

You can stop it, watch it, restart it, you can open a tunnel and open the server from outside your network…

2

u/Cultural_Lock_3552 9d ago

I've seen a few apps trying to achieve that but this one seem to be really polished and taken to the finish line. Good job.

2

u/mathiswrong 9d ago

This is legitimately useful. Thank you.

1

u/Swimming-Ad6447 10d ago

Coding agents leaving orphan dev servers behind on random ports is way too familiar lately. Showing which project folder and which launcher started the process saves a lot of lsof guessing, definitely giving this a try.

1

u/cl0udminer 10d ago

This is awesome, much better than looking through the terminal command output to figure out whats running. Thank you!

0

u/nyteschayde 9d ago

Love the idea, unfortunate choice of name as it collides with Mac Ports (alternate package manager to Homebrew)

2

u/AlteredStateOfMind 9d ago

There is not Mac in the name ;)

0

u/movingimagecentral 9d ago

“ the project it belongs to and what started it ”

Can’t even be bothered to write a headline that isn’t full of garble backwards AI speak

-3

u/Yellow_Robot 10d ago

Requires macOS 26

ok, good buy

0

u/ThanhDongNguyen 10d ago

The 1.0.9 chain thing is nice, but the catch you mention (Ports has to be running when the server starts) is exactly the case people will hit after a reboot or first install.

Maybe make "launch at login" on by default in first run, and mark rows where the chain is only the fallback (responsible app) with a small icon or "guessed" label. Otherwise I think people will see "Ghostty" for an orphan server and assume it's wrong.

Also would be useful to copy the full command + cwd from a row, for when I want to restart it manually from terminal.

2

u/AlteredStateOfMind 10d ago

All fair, thanks for taking the time.

Launch at login: agreed that's the real gap. I don't want to switch it on silently (macOS flags that, and people rightly hate surprise login items), so I'll add a first-run prompt that asks.

Guessed launcher: good call. Right now a remembered chain and a fallback look the same, and they shouldn't. I'll mark the fallback ones so "Ghostty" on an orphan reads as "probably", not as fact.

Copy command + cwd: half there today. Right-click a row for Copy Command, and the folder is in the details, but there's no single copy for both. I'll add one that gives you "cd <folder> && <command>" ready to paste.

Will post back when it's in

1

u/AlteredStateOfMind 10d ago

All three are in 1.0.10, out now.

Launch at login: Ports asks once, in the panel, the first time you open it. No silent login item.

Guessed launcher: an orphan whose shell was gone before Ports saw it now reads "Probably Ghostty" on the row, and the details say it's a best guess based on what macOS holds responsible.

Copy command + cwd: right-click a row, "Copy Command with Folder". You get cd <folder> && <command>, and it's the command you typed (npm run dev), not the node process behind it.

Thanks, these made it better.