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
Section titled “Synopsis”bhatti share <sandbox> [—revoke]
Description
Section titled “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
Section titled “Examples”bhatti share devShell: https://api.bhatti.sh/_shell/a1b2c3d4#token=k3m9x2qr...# JSON for scriptingbhatti share dev --json{ "url": "https://api.bhatti.sh/_shell/a1b2c3d4#token=k3m9x2qr...", "token": "k3m9x2qr..."}# Revokebhatti share dev --revokeShell access revoked.Options
Section titled “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
Section titled “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