bhatti ports
List the listening TCP ports detected inside a sandbox.
Synopsis
Section titled “Synopsis”bhatti ports <sandbox>
Description
Section titled “Description”The host periodically scans each running sandbox for listening ports and caches them. bhatti ports reads that cache and prints one row per port. Each row also shows the path-based proxy URL — a developer convenience for hitting the port from the host without a domain or bhatti publish.
The proxy URL goes through the API server at <api>/sandboxes/<id>/proxy/<port>/.... It requires the same Bearer auth as any other API call — useful for poking at services during development. For public, auth-free URLs, use bhatti publish.
Cold sandboxes are not scanned (they have no listening processes by definition). To list ports for a sleeping sandbox, wake it first or just send a request that triggers a wake.
Examples
Section titled “Examples”bhatti ports devPORT URL3000 http://localhost:8080/sandboxes/dev/proxy/3000/6379 http://localhost:8080/sandboxes/dev/proxy/6379/# Quick test against a service inside the sandboxbhatti ports dev --json | jq -r '.[] | .proxy_url' | head -1 | xargs curl -H "Authorization: Bearer $BHATTI_TOKEN"Options
Section titled “Options”This command takes only global flags. See Global flags for --url, --token, --json, --timing, --data-dir.
See also
Section titled “See also”bhatti publish— public auth-free URL for a port- API:
GET /sandboxes/:id/ports - API:
ANY /sandboxes/:id/proxy/:port/*