@fleetagent/pi-daemon
v0.1.2
Published
Remote commander daemon for Pi
Readme
@fleetagent/pi-daemon
Remote commander daemon for Pi. It listens for Pi's WebSocket remote tool protocol and executes file and shell operations in its working directory.
Install
npm install -g @fleetagent/pi-daemonRun
PI_DAEMON_TOKEN=secret \
PI_DAEMON_CWD=/workspace \
PI_DAEMON_PORT=8787 \
pi-daemonDefaults:
PI_DAEMON_HOST/HOST:127.0.0.1PI_DAEMON_PORT/PORT:8787PI_DAEMON_CWD: current directoryPI_DAEMON_TOKEN: optional bearer token
Connect from Pi
Direct:
pi --remote 'ws://127.0.0.1:8787?token=secret'Deferred:
pi --remote-deferred --remote-cwd /workspaceThen inside Pi:
/remote daemon ws://127.0.0.1:8787?token=secretFile transfers
The daemon protocol supports streamed file upload and download for binary and text files:
downloadFilestreams{ event: "fileData", dataBase64 }chunks followed byfileEnd.uploadFileStart,uploadFileChunk, anduploadFileEndwrite chunked base64 data to a sandbox file.
Pi RPC exposes these as upload_file and download_file commands when the daemon is configured as the remote sandbox backend.
