Repository navigation
v0.3.0 — baerly-storage goes public
Storage is the missing primitive for agent-built software — and all you need is a library.
baerly-storage turns AWS S3, Cloudflare R2, or any conformant S3-compatible bucket into a document database. There is no runtime. None. No daemon, no leader, no scheduler, no catalog, no database bill, no on-call. The only persistent component is your bucket — the data lives in your account, in a format you can read.
This is the first release intended for outside use. 🎉
Why it exists
Compute → FaaS
Tokens → LLM API
Storage → this.
Built like git: content-addressed documents, immutable numbered log entries, and one conditional log create as the commit, per collection. You get a document model, live queries, and snapshot isolation — and the whole public API fits in a ~12k-token dist/API.md, small enough for an LLM to hold in context and use zero-shot.
The server bundle is ~100 KB gzipped; the browser client ~5 KB. Maintenance (compaction + GC) rides the write path — Cloudflare finishes it with ctx.waitUntil, Node runs it inline — so idle buckets pay nothing and there's no cron to install.
Get started
# scaffold an app — Cloudflare Workers + R2, or self-hosted Node + S3
pnpm create @gusto/baerly-storage@latest
# …or add it to an existing project
pnpm add @gusto/baerly-storageDay-one templates ship for Cloudflare Workers (R2) and self-hosted Node (S3), plus a React SPA variant of each.
Is it for you?
Sized for small, server-only-write apps with a ~10 GB ceiling and a mechanical exit to Postgres when they outgrow it. If that's your shape, you get a tool that matches it instead of a stack that doesn't. If you need multi-writer client sync, multi-document transactions, or terabytes, reach for a real database — and baerly will tell you when you've crossed the line.
Pre-1.0
This is 0.x: the on-disk format and public API may still change between minor versions until 1.0. Pin your version.
Full technical changelog (including migration notes for anyone who ran an internal 0.1–0.2 build): see the 0.3.0 entry in CHANGELOG.md.
📦 @gusto/baerly-storage on npm · 📚 Docs · 🧠 Theory