bhatti file read
Read a file from a sandbox and write its bytes to stdout.
Synopsis
Section titled “Synopsis”bhatti file read <sandbox> <path>
Description
Section titled “Description”Streams the file’s contents to stdout, byte-for-byte. The path must be absolute. Cold sandboxes wake transparently before the read.
The CLI always reads the whole file. The API supports partial reads (offset, limit, max_bytes query params) for tailing logs without transferring the entire file — call it directly when you need that. Every response includes an X-File-Size header so clients can detect truncation. See API: files.
Examples
Section titled “Examples”bhatti file read dev /workspace/app.js# Pipe to other toolsbhatti file read dev /workspace/data.json | jq .name# Save to a local filebhatti file read dev /var/log/agent.log > agent-$(date +%F).logOptions
Section titled “Options”This command takes only global flags. See Global flags for --url, --token, --json, --timing, --data-dir.
See also
Section titled “See also”bhatti file write— opposite directionbhatti file ls— list a directory- API:
GET /sandboxes/:id/files