- Menu bar app - Lives in your menu bar for quick access
- Port scanning - Displays all listening TCP ports with process info
- Expandable details - Click any port to see the full command line path
- App icons - Shows application icons for GUI processes
- Filter & search - Filter ports by name, port number, or path
- Hide ports - Hide frequently-running ports you don't need to see
- Process control - Terminate (SIGTERM) or kill (SIGKILL) processes
- Docker support - View and manage containers with published ports
- Auto-refresh - Configurable refresh intervals (5s, 10s, 30s, or manual)
brew tap mwhesse/tap
brew install --cask openports- Download
OpenPorts.zipfrom the latest release - Unzip and move
OpenPorts.appto your Applications folder - Remove the quarantine attribute (required for unsigned apps):
xattr -cr /Applications/OpenPorts.app
Requirements: macOS 13.0+, Xcode 15+, XcodeGen
brew install xcodegengit clone https://github.com/mwhesse/OpenPorts.git
cd OpenPorts
xcodegen generate
open OpenPorts.xcodeprojPress ⌘R in Xcode to build and run. Look for the network icon in your menu bar.
OpenPorts/
├── OpenPortsApp.swift # App entry point with MenuBarExtra
├── Models/
│ ├── PortInfo.swift # Port/process data model
│ ├── DockerContainer.swift # Docker container model
│ └── AppSettings.swift # User preferences (persisted)
├── Services/
│ ├── PortScanner.swift # Scans for open ports using lsof
│ ├── ProcessManager.swift # Terminate/kill processes
│ └── DockerService.swift # Docker container management
├── Views/
│ ├── ContentView.swift # Main popover content
│ ├── PortRowView.swift # Individual port row (expandable)
│ ├── DockerRowView.swift # Docker container row
│ └── SettingsView.swift # Settings popover
└── Utilities/
└── ShellExecutor.swift # Shell command execution
- Click a port row to expand and see the full process command line
- Hover over a port to reveal the hide/unhide button
- Use the filter field to search by process name, port number, or path
| Button | Action |
|---|---|
| Open | Open http://localhost:PORT in browser |
| Copy | Copy URL to clipboard |
| Terminate | Send SIGTERM (graceful shutdown) |
| Kill | Send SIGKILL (force kill) |
| Button | Action |
|---|---|
| Restart | Restart the container |
| Stop | Graceful stop (docker stop) |
| Kill | Force kill (docker kill) |
Click the gear icon to access settings:
| Setting | Description |
|---|---|
| Auto-refresh | Manual, 5s, 10s, or 30s intervals |
| Confirm before kill | Show confirmation dialog for process termination |
| Confirm before Docker stop | Show confirmation for container operations |
| Show Docker containers | Toggle Docker section visibility |
| Show system processes | Include root/system-owned processes |
| Launch at login | Start OpenPorts when you log in |
- Click the refresh button
- Check if the process is owned by root (enable "Show system processes" in settings)
- Verify the port is listening:
lsof -iTCP -sTCP:LISTEN -P -n | grep PORT
Some processes (especially system processes) require elevated privileges. The app cannot kill processes owned by root or other users.
- Ensure Docker Desktop is running
- Enable "Show Docker containers" in settings
- Verify Docker CLI works:
docker ps
MIT License - See LICENSE for details.