Skip to content

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.

bhatti share <sandbox> [—revoke]

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.

Terminal window
bhatti share dev
Shell: https://api.bhatti.sh/_shell/a1b2c3d4#token=k3m9x2qr...
Terminal window
# JSON for scripting
bhatti share dev --json
{
"url": "https://api.bhatti.sh/_shell/a1b2c3d4#token=k3m9x2qr...",
"token": "k3m9x2qr..."
}
Terminal window
# Revoke
bhatti share dev --revoke
Shell access revoked.
FlagDefaultDescription
--revokefalseDelete the active token for this sandbox. The shared URL stops working immediately.

See Global flags for --url, --token, --json, --timing, --data-dir.