Start
Commands
Everything the CLI does. Every command takes --json for scripts and coding agents.
| Command | What it does |
|---|---|
whoseport | List every listening port with process, project, framework and health. Also ls, list, ports. |
whoseport <port> | Inspect one port: PID, command, parent chain, cwd, project, Git branch, HTTP checks. |
whoseport inspect <target> | Inspect a port, a process (pid:4821) or a container by name or id. |
whoseport watch | Print the port table, then stream changes as they happen. --interval sets the seconds between scans (default 5). |
whoseport ask "…" | Run an investigation from a question. --mode explain stops at the diagnosis; --local runs it on this machine with your own model key. |
whoseport diagnose | Investigate the unhealthy services and failed dependencies in this environment. |
whoseport doctor | Check that the collectors work here: lsof or ss, ps, Git, Docker, agent, cloud, model key. |
whoseport agent … | start the background agent, connect <token> it to the dashboard, show status, or disconnect from the cloud. |
whoseport mcp | Run the MCP server on stdio for a coding agent. |
Flags
| Flag | Effect |
|---|---|
--json | Versioned, machine-readable output. |
--no-probe | Skip the HTTP health checks, for a faster scan. |
--help, --version | Usage and version. |
Inspect a port
bash
$ whoseport 8080 PORT 8080 ! :8080 has 2 owners: bun (pid 48291, IPv4) and node (pid 51022, IPv6). Process bun PID 48291 Command bun run --watch src/main.ts Started 14m ago Cwd ~/code/gateway Project gateway ~/code/gateway Git branch feature/auth (2 changed) Runtime Bun Framework Elysia (90%) HTTP GET /health 200 41ms
The warning only appears when two different processes hold the same port, typically one on IPv4 and one on IPv6. Clients that resolve localhost can reach either, so requests silently land on the wrong server.
JSON output
Add --json to any command. Every response is wrapped in the same envelope, with a schemaVersion that changes only when the shape does. watch prints one JSON event per line.
bash
$ whoseport 8080 --json | jq '.data.listeners[0]'
{ "protocol": "tcp", "address": "*", "port": 8080, "state": "listen", "pid": 48291, "processName": "bun", "family": "ipv4" }