packages/os/usb-installer/README.md
Electrobun-targeted microapp scaffold for preparing bootable elizaOS USB installers.
The current package is intentionally dry-run only. It models the destructive workflow and safety gates without writing to disks.
UsbInstallerBackend.bun run --cwd packages/os/usb-installer dev
bun run --cwd packages/os/usb-installer build
bun run --cwd packages/os/usb-installer test
bun run --cwd packages/os/usb-installer typecheck
src/backend/types.ts is the load-bearing boundary between the renderer and the
future privileged helper:
listRemovableDrives() returns drive candidates with safe-removable,
blocked-system, or unknown safety classifications.listImages() returns trusted elizaOS image metadata after manifest
validation. Invalid URLs, checksums, unsupported channels/architectures,
missing build metadata, and impossible minimum USB sizes are rejected.createWritePlan() returns the resolve, checksum, write, verify, and complete
steps. The dry-run backend never writes bytes and always reports
privilegedWriteImplemented: false.macOS:
diskutil list -plist and diskutil info -plist.Linux:
lsblk --json --bytes --paths.pkexec, udisks2, or a small audited helper for privileged writes.Windows:
Get-Disk/Get-Volume or
SetupAPI.This package is structured so Electrobun can host the Vite renderer while the
renderer only talks to a local UsbInstallerBackend HTTP/IPC contract. Platform
enumeration and any future raw writes stay in server.ts or a signed privileged
helper, never in browser-rendered code. The first real write helper should keep
the same interface and replace only the dry-run execution path, with a narrow
audited helper responsible for raw device writes and verify reads.