browser#
Open URLs and optionally wait for a frontend service to become available.
Functions#
- check_port port [host=localhost]
- Purpose: TCP connect test using
ncortelnet. -
Returns: success when the port is reachable.
-
open_url url
- Purpose: Open a URL in the default browser (Linux/macOS/Windows shells).
-
Behavior: Tries
xdg-open,open,gio, orcmd.exe /c start. -
open_frontend_when_ready [max_wait_seconds=120]
- Purpose: Wait for a
frontendcompose service to be running and its port to accept connections, then open the URL. - Env:
FRONTEND_HOST(defaultlocalhost)FRONTEND_PORT(default3000)COMPOSE_ARGS(optional array) - additional args fordocker_compose.
- Behavior: Waits up to
max_wait_secondsand logs progress; opens the URL even on timeout.
Dependencies#
ncortelnetfor port checks;docker compose/docker-composefor service checks; platform opener.