Skip to content

Networking & sharing

Expose sandbox services to the world (or a teammate) without an API key on the receiver’s side.

CommandDescription
bhatti publishPublish a sandbox port at a public URL. Cold sandboxes wake on the first request.
bhatti unpublishRemove a published port.
bhatti shareGenerate a one-shot URL that opens an interactive terminal in the browser.

Both publish and share produce URLs that don’t require an API key. Treat them like any other secret — anyone with the URL has access.

Terminal window
# Publish on a friendly subdomain
bhatti publish dev -p 3000 -a my-app
# → https://my-app.bhatti.sh
# Auto-generated alias (random suffix prevents URL guessing)
bhatti publish dev -p 3000
# → https://dev-k3m9x2.bhatti.sh
# Publish + give a teammate a browser shell in one call
bhatti publish dev -p 3000 -a demo --shell
# Share a sandbox shell over the web
bhatti share dev
# → https://api.bhatti.sh/_shell/<id>#token=...
# Revoke any active share link
bhatti share dev --revoke
# Tear down a published port
bhatti unpublish dev -p 3000

Public URLs at https://<alias>.<your-zone> only work when the server is configured with a custom domain. Without one, bhatti publish falls back to a path-based proxy:

http://<api-host>/sandboxes/<id>/proxy/<port>/

That URL still works, but it requires Bearer auth. Useful for development; not suitable for sharing publicly. See bhatti publish for the exact fallback behaviour.