端口属于谁
Know the owner
从进程、工作目录和项目标记推断归属,避免只看到一个模糊的 node。
It uses the process, working directory and project markers, so you see more than a generic node.
macOS 菜单栏端口管理与命令行工具
macOS Menu Bar Port Manager & CLI
LeftOpen 在菜单栏里告诉你 localhost 上的端口、进程和可能关联的项目。
LeftOpen shows the ports, processes and likely projects still listening on localhost.
$ brew install --cask songhaifan/tap/leftopen也可从 GitHub Releases 下载。
Or download it from GitHub Releases.
支持 Apple Silicon 和 Intel Mac · macOS 14+
Apple Silicon and Intel Macs · macOS 14+

从进程、工作目录和项目标记推断归属,避免只看到一个模糊的 node。
It uses the process, working directory and project markers, so you see more than a generic node.
区分只在本机监听的服务,以及可能暴露到局域网的端口。
It distinguishes local-only services from ports that may be visible on your LAN.
可关闭的服务在前;系统服务和应用仍可查看,但不会被 LeftOpen 关闭。
Closable services come first. System services and apps remain visible, but LeftOpen will not close them.
先轻轻关闭。LeftOpen 优先发送 SIGTERM。单独关闭后仍在监听,该进程会显示失败提示;警告会说明两分钟内再次关闭将强制结束。执行前重新核验进程身份,保留安全保护,不收集遥测。
Gentle close first. LeftOpen sends SIGTERM first. If a single-process close leaves it listening, that process is marked and the warning explains that closing it again within two minutes will force close it. Identity checks and safety protections still apply. No telemetry.
App 随附同一套扫描与关闭规则的 CLI。
The app includes a CLI with the same scan and closing rules.
leftopen列出监听端口List listening portsleftopen 3000解释一个端口Explain one portleftopen close 3000确认后请求退出Request an exit after confirmation$ leftopen MY PROJECTS PORT OWNER PROCESS SCOPE 5173 visdelta node LOCAL 5511 visdelta node LOCAL SERVICES 11434 Ollama ollama LOCAL 8384 Syncthing syncthing LAN
打开 LeftOpen 菜单栏或在终端运行 leftopen 3000,立刻看清是哪个开发服务或项目占用了端口,一键轻柔结束,无需重启电脑。
Open LeftOpen in your menu bar or run leftopen 3000 in your terminal. See which dev server or project owns the port and close it gently—no reboot or guess-killing needed.
lsof 往往只显示含糊的 node 和 PID,容易误杀其他项目;而 kill -9 强制终止无法执行清理钩子。LeftOpen 会向上追溯项目目录与图标,并在发 SIGTERM 前核验进程与关联端口。
lsof only prints raw PIDs and generic process names like node, risking collateral damage. kill -9 corrupts caches. LeftOpen resolves the project directory and icons, and validates start times before sending SIGTERM.
绑定在 0.0.0.0 或无线网卡 IP 的端口,同 Wi-Fi 下的其他设备可以直接访问。LeftOpen 将其醒目标记为 LAN,防止调试接口或数据库在公共网络意外暴露。
Services listening on 0.0.0.0 or your Wi-Fi IP can be reached by other devices on your network. LeftOpen flags these as LAN so dev endpoints or databases aren't accidentally exposed.
支持 Node.js、Vite、Next.js、Python、Go、Rust、Docker、Redis、Postgres、Ollama 等,自动解析 package.json、pyproject.toml、Cargo.toml、go.mod 和 macOS 应用程序。
Supports Node.js, Vite, Next.js, Python, Go, Rust, Docker, Redis, Postgres, Ollama and more—by inspecting working directories, manifest files, and macOS app bundles.