bhatti share
Generate a URL that opens an interactive terminal in the browser. No CLI install or API key needed on the receiver's side.
Synopsis
bhatti share <sandbox> [--revoke]
Description
Mints a fresh token bound to the sandbox and embeds it in the URL fragment (#token=...). The fragment is not sent to the server in HTTP request lines, so the token doesn't appear in access logs or referer headers — but anyone with the URL has shell access until the token is revoked.
Each call invalidates the previous token. Calling bhatti share dev again generates a new URL; the old one stops working. Only one share link is active at a time per sandbox.
Scope. A share token grants access only to the specific sandbox it was minted for. It is not interchangeable with the user's API key.
Behaviour in the browser. The page opens an xterm.js terminal connected via WebSocket; it's a full PTY session, identical to bhatti shell. Closing the tab detaches; the session keeps running and scrollback is preserved. Reopening the URL reattaches.
Revoke with --revoke — the token is deleted server-side and the URL stops working.
Examples
bhatti share dev
Shell: https://api.bhatti.sh/_shell/a1b2c3d4#token=k3m9x2qr...
# JSON for scripting
bhatti share dev --json
{
"url": "https://api.bhatti.sh/_shell/a1b2c3d4#token=k3m9x2qr...",
"token": "k3m9x2qr..."
}
# Revoke
bhatti share dev --revoke
Shell access revoked.
Options
| Flag | Default | Description |
| ---- | ------- | ----------- |
| --revoke | false | Delete the active token for this sandbox. The shared URL stops working immediately. |
See Global flags for --url, --token, --json, --timing, --data-dir.
See also
bhatti publish --shell— preview URL + share URL in one callbhatti shell— terminal-based interactive shellbhatti shell— the CLI counterpart- API:
POST /sandboxes/:id/shell-token