Litestream
$ litestream Community Med Risklitestream continuously streams SQLite write-ahead log (WAL) pages to object storage (replicate) and restores point-in-time snapshots (restore -o). It ships as a single static Go binary with -json inspection on litestream databases and safe overwrite protection on restore.
brew install litestream litestream streams local SQLite WAL files and restores database binaries directly on disk; this is pure systems/CLI tooling with no MCP equivalent.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Single-purpose subcommands (databases -json, restore, status, replicate) run headlessly with -config - stdin support, though replicate is a foreground daemon.
- Supports
databases -jsonand-config -stdin YAML config
litestream restore refuses to overwrite an existing database file by default and supports -timestamp PITR and -o alternate output paths.
- Refuses to overwrite existing DB files on
restoreunless targeted safely via-o
Single static Go binary available via Homebrew and official GitHub releases for macOS and Linux.
- Static Go binary distributed via Homebrew and GitHub releases
Turns local SQLite into disaster-recoverable cloud-backed storage with minimal ops footprint.
- Zero-dependency continuous SQLite WAL replication and PITR restore
Created by Ben Johnson and maintained under Fly.io (benbjohnson/litestream) with Apache-2.0 license.
- Apache-2.0 repository backed by Fly.io
Clear command and YAML reference at litestream.io/reference/.
- Official docs at litestream.io
Security, Auth & Guardrails
Reads /etc/litestream.yml (or -config <path> / -config -) and cloud credentials via LITESTREAM_ACCESS_KEY_ID, LITESTREAM_SECRET_ACCESS_KEY, or standard AWS/GCP/Azure env vars.
Apache-2.0 open-source CLI; remote S3/GCS/Azure bucket storage and requests incur cloud charges.
# Litestream Agent Rules - Always pass `-o <new-path>` on `litestream restore` so restored snapshots never overwrite live DBs. - Remember `litestream replicate` is a long-running daemon; invoke it only when running a supervised service. - Use `litestream databases -json` to verify replica paths before restoring.
Agent-Ready Command Recipes
Safe Read-Only Queries
litestream databases -config litestream.yml -json
Emits JSON metadata for all SQLite databases and replica targets defined in the config.
Controlled Writes & Previews
litestream restore -config litestream.yml -o /tmp/restored.sqlite /var/lib/app/app.sqlite
Restores the latest snapshot and WAL frames into /tmp/restored.sqlite without touching the live file.
Strengths for Agents
- +
litestream restoreprotects existing databases by failing if the destination exists;-owrites safely to a new file. - +
litestream databases -jsonand-config -make config verification scriptable.
Caveats & Pitfalls
- !
litestream replicateruns continuously in the foreground and is not a one-shot command. - ! No official native Windows binary; primarily targets Linux and macOS.