leftopen README

The project's README from github.com/SonghaiFan/leftopen. As one markdown file: README.md.

LeftOpen Logo

LeftOpen

Native macOS Menu Bar Port Manager & CLI

See what your tools left running on localhost, identify projects, and gently close them.

Website Release Homebrew Cask macOS 14+ Apple Notarized License: MIT

English · 中文


LeftOpen menu bar panel: closable ports first, apps and system services folded away

When I have several coding agents working in parallel, dev servers and test runners keep starting up on different ports. By the end of the day there are always a few still running.

Existing tools are either too much, or only tell you "port in use" without saying which process it is or which project it came from.

So I made LeftOpen. It sits quietly in the menu bar and shows you the listening ports, the processes behind them and the projects they probably belong to. Once you've had a look, you close the ones you no longer need.

Close the doors that were left ajar, gently.


Installation

brew install --cask songhaifan/tap/leftopen

Supports Apple Silicon and Intel Macs running macOS Sonoma (14.0+). The app and bundled CLI are universal binaries, signed with a Developer ID and notarized by Apple.

Manual download

Get LeftOpen-release.zip from GitHub Releases, unzip, and move LeftOpen.app to /Applications.


Design & Features


Fixed project addresses

Dev servers move between ports; their address doesn't have to. LeftOpen bundles Portless 0.15.7 and Node 24.14.0, so there's nothing extra to install.

  1. One-time setup: Turn on Settings → Projects → Fixed addresses. macOS asks for authorization to trust a local CA, install a loopback-only HTTPS service on the selected proxy port (443 by default), and manage exact /etc/hosts entries. Only explicit Settings actions ask; project actions and background scans never do.
  2. Per project: start the project as usual, then click Enable fixed address in its port details. It's reachable at https://myapp.localhost.

How it behaves:

Earlier HTTP addresses keep working; finish the HTTPS upgrade from the same Settings page. Portless (Apache-2.0) and Node ship with their licenses.

Address settings: Settings → Projects has a single fixed-address row, with no manual port configuration. Initial setup prefers 443, automatically trying 8443–8462 on conflict within the same authorization. Successful setup remembers the selected port and includes it in opened/copied URLs. Other listeners are never stopped; failures retain copyable diagnostics. Ports are not automatically migrated while LeftOpen-launched projects run. Turning off removes managed routes but preserves bindings, certificates and the proxy without stopping project servers; stop LeftOpen-launched projects first.


Why LeftOpen? (Common Use Cases)


CLI

Available in the terminal right after installing:

# List every listening port and its owner (or: leftopen list)
leftopen

# Explain one port
leftopen 3000

# Open http://localhost:3000 in the default browser
leftopen open 3000

# Print a project's verified fixed address (e.g. https://myapp.localhost)
leftopen url myapp

# Close the process on a port (SIGTERM, asks first)
leftopen close 3000

# Structured JSON output
leftopen --json

Sample output:

LEFT OPEN
26 listening ports · 17 processes · 1 projects · 8 LAN-visible

MY PROJECTS (2)
PORT    PID      OWNER          PROCESS    AGE      SCOPE
5173    76344    visdelta       node       2h       LOCAL
         ↳ ~/Documents/visdelta
5511    4999     visdelta       node       27m      LOCAL
         ↳ ~/Documents/visdelta

APPLICATIONS (16)
PORT    PID      OWNER          PROCESS    AGE      SCOPE
5000    696      ControlCenter  Control    3d       LAN
9222    36824    Google Chrome  Chrome     5h       LOCAL

SERVICES (3)
PORT    PID      OWNER          PROCESS    AGE      SCOPE
11434   911      Ollama         ollama     1d       LOCAL

LOCAL = this Mac only · LAN = may be reachable from your local network

Development

Maintainers: one-click releases.

# Tests
swift test

# Build the app locally
LEFTOPEN_OUTPUT_DIR=dist/dev Scripts/build-app.sh

License

MIT License

leftopen (SonghaiFan/leftopen)

Searching Database…

What is this?LeftOpen is a native macOS menu bar app and CLI that shows what is listening on localhost, identifies which project or process owns each port, and lets you gently close them.
Is this just a GUI, or do I also get a command-line tool?Both: a SwiftUI menu bar app (MenuBarExtra, no Dock icon) and a bundled 'leftopen' CLI with the same inference and safety rules.
Do I need Homebrew or anything else before trying it?It requires macOS Sonoma (14.0+) on Apple Silicon or Intel; Homebrew is the recommended install path but a manual zip download also works.
How does it decide when to force-kill a process?It always tries SIGTERM first and re-checks process identity; if the process is still listening after five seconds, closing it again within two minutes escalates to SIGKILL as a deliberate second action.
Does it work on Intel Macs too, or only Apple Silicon?Yes, it's a universal binary that runs on both Apple Silicon and Intel Macs, as long as they're on macOS Sonoma or later.
Does it phone home or track anything?No telemetry and no background service by default; the only outbound request is a daily check for the latest GitHub release, which can be disabled in Settings.
How does it figure out which project a port belongs to?It walks up from the process's working directory looking for .git, package.json, pyproject.toml, Cargo.toml or go.mod, or resolves the owning .app; it also names global npm/python modules and standalone services like Redis, Postgres or Ollama.
How is this different from lsof or kill-port?Those tools only report raw PIDs or ambiguous process names, while LeftOpen tracks working directory and project root to show full context, and uses graceful SIGTERM with identity re-verification instead of a blunt kill -9.
What is the fixed project addresses feature?Powered by a bundled copy of Portless, it gives a dev server a stable local HTTPS URL that stays the same even as its underlying port changes between restarts.
Can it tell if a port is exposed to my local network?Yes, it distinguishes ports bound only to 127.0.0.1 (local only) from ones on 0.0.0.0 or a LAN address, so you can spot accidental network exposure.
Creator
SonghaiFan
Size
3.3 MB
Stars
129
Age
1mo
Commits · 90 Days