BoxDB
A database for your $5 VPS.
SQLite with validated logical types, native exact decimals and temporal values, for Rust, TypeScript, Go and the command line. Keep application data in a binary SQLite file, or choose readable YAML for small Git-tracked datasets.
Website & documentation · Quickstart · Releases · API reference
Experimental, version 0. APIs and BoxDB storage contracts may change. Binary files keep SQLite's standard page and record encoding; native values and indexes require BoxDB's patched engine.
Try it
Install the standalone CLI with Homebrew:
Or use npm with Node.js 22.18+ on macOS ARM64 or Linux x64/ARM64 with glibc 2.35+ (Ubuntu 22.04+ or 64-bit Raspberry Pi OS Bookworm+):
Then run:
The exact total is 0.3. Bind decimal strings for exact input.
Run boxdb data.db for the interactive shell, or follow the
quickstart to query, inspect and back up a database.
Standalone binaries are available in releases.
Choose your client
| Client | Installation | Documentation |
|---|---|---|
| TypeScript / Node.js / Bun | npm install @boxdb/client |
Client guide |
| Rust | cargo add boxdb |
Client guide · API |
| Go | Go module plus matching native library | Installation and database/sql |
| CLI | brew install lebedev-nikita/tap/boxdb or npm install -g @boxdb/cli |
Command-line guide |
For TypeScript integrations, use the Drizzle, Better Auth or db0 adapter. For AI-assisted projects, use the BoxDB usage skill.
Why BoxDB?
- Types with meaning. Bounded signed/unsigned integers, enums, exact decimals, UUIDs, UTC instants, calendar values, intervals and typed arrays. Ordinary tables are STRICT by default.
- A shared core. The same validation, SQL migrations and storage across clients. The TypeScript client executes SQL on a native worker.
- Built-in SQL tools. FTS5, R*Tree, vector search, Unicode text and regular expressions, without runtime extension loading.
- Two storage choices. Binary SQLite for application data; readable YAML for small datasets you want to review as text.
BoxDB is intended for single-server applications. It has no built-in remote server or distributed writes. Readable storage executes in memory, has one writer per file and writes a complete snapshot on commit. JSON is a validated opaque document; SQL JSON/JSONB processing is disabled.
Read the fit and tradeoffs before adoption. See benchmark methodology to measure your workload.
Documentation
Start at the documentation index, or go directly to:
- SQL and types, exact decimals and temporal values.
- Storage and validation and SQL extensions.
- Migrations and schema export.
- Deployment and backups, Litestream replication, diagnostics and recovery and client errors.
- FAQ.
Contribute
See CONTRIBUTING.md for prerequisites, checks and pull requests.
With the development toolchain installed, run just check; use just --list
for focused commands. Build from source with cargo install --path . --locked.
See npm releases and Rust releases
for package publication, and website development for GitHub Pages.
Report a bug or request a feature. Report vulnerabilities privately through the security policy. BoxDB is MIT licensed.