You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: orca ports CLI command to list a workspace's detected ports #32632
Orca already finds the listening ports for each workspace and shows them on the workspace card, in the status-bar popover and in the Ports panel. Scripts can't get at this list, because the CLI has no command for it.
The use case is a quick command or agent step that opens "the dev site of this workspace". Many dev servers (Puma with port 0, Vite when its default port is taken) pick a random port and don't write it anywhere. To find it today, a script has to repeat Orca's own scan with lsof -iTCP -sTCP:LISTEN, then lsof -d cwd for each PID, then compare the paths. That's slow, fragile, and breaks on SSH and remote workspaces, which Orca already handles.
Proposed solution
A read-only command built on the host-scoped scan from #27188 (workspacePorts.scanHost):
orca ports [--worktree <selector>] [--json]
Default worktree is the current one, as worktree current already resolves it.
Each row shows the port, PID, process name, connect host, protocol, how the owner was matched (cwd / command), and the URL the dev server printed, if Orca saw one.
--json returns the same rows as WorkspacePortScanResult.
Optionally, --all would list ports for every workspace, like the status-bar popover.
With this, "open my dev site" becomes:
open "$(orca ports --json | jq -r '.ports[0].advertisedUrl // "http://localhost:\(.ports[0].port)"')"
Activity