Local runtimes, on this Mac.
See who owns :3000. Stop the leftover tree.
Portkeep is a macOS menu bar app for leftover localhost ports. It shows what is listening, which project it belongs to, and whether a human, Cursor, or Claude Code started it. Stop the whole process tree. Reserve a stable port per worktree. Give agents a CLI and MCP.
Yours, with no catch. Ports, PIDs, command lines, and folders stay on this Mac. There is no account, no analytics, and no paid tier. The only optional network call is a Sparkle version check you can turn off.
The panel. Leftovers first. Then your projects. |
Same picture from the terminal. |
- Who started this — Cursor Agent, Claude Code, your terminal, or an orphan reparented to launchd.
- Stop the tree — not just the pid on the port. The wrapper, the children, then SIGKILL if it hangs.
- Stable ports —
portkeep alloc webgives the same port back in this worktree. - Policy — postgres, redis, ollama, and other known services stay locked.
--forceis SIGKILL only; it does not bypass policy.
Download Portkeep 1.0.0 for Mac — signed and notarized. Menu bar extra, no Dock icon. Hotkey: Control-Option-P.
Or build from source (macOS 14+, Xcode 16+, XcodeGen):
git clone https://github.com/Slowper/Portkeep.git
cd Portkeep
xcodegen generate
xcodebuild -project Portkeep.xcodeproj -scheme Portkeep -configuration Debug \
-derivedDataPath /tmp/portkeep-dd build
open /tmp/portkeep-dd/Build/Products/Debug/Portkeep.appOpen Settings from the panel, or run portkeep settings.
After Settings → Agents → Install, or from Portkeep.app/Contents/Helpers/portkeep:
portkeep list what's listening
portkeep who 3000 who owns a port
portkeep alloc web same port next time, in this worktree
portkeep stop 3000 stop the process tree
portkeep install --mcp CLI + Cursor / Claude Code MCP
portkeep snippet --write AGENTS.md block for this folder
Nothing leaves this Mac except an optional Sparkle version check. See the privacy page.
mdm/ has a sample profile. scripts/pkg.sh builds an installer pkg. Preference domain: com.sajidpalagiri.portkeep. See mdm/IT.txt.
MIT. Issues and pull requests are welcome. Keep stops policy-safe. Do not commit signing keys, notarized disk images, or ~/.portkeep data.



