Analysis updated 2026-06-24 · repo last pushed 2018-03-02
Add a persistent key-value store to a Go CLI without running a separate database server
Use buckets and nested buckets to organise structured records inside one file
Wrap db.Update and db.View transactions around your code for safe concurrent access
Migrate later to the maintained bbolt fork while keeping the same API and file format
| boltdb/bolt | billionmail/billionmail | sqshq/sampler | |
|---|---|---|---|
| Stars | 14,635 | 14,699 | 14,563 |
| Language | Go | Go | Go |
| Last pushed | 2018-03-02 | — | — |
| Maintenance | Dormant | — | — |
| Setup difficulty | easy | moderate | easy |
| Complexity | 3/5 | 3/5 | 2/5 |
| Audience | developer | ops devops | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Project is no longer maintained, new code should use the bbolt fork instead, which has the same API.
Bolt is an embedded key value database written in pure Go. Rather than running as a separate server like Postgres or MySQL, it lives as a library inside a Go program and stores data in a single file on disk. The README says it was inspired by an existing C database called LMDB and is meant for projects that need a simple, fast, and reliable place to keep data but do not need a full database server. The API is intentionally tiny: get a value, set a value, and not much more. The project status section is important context. Bolt is stable, the API is fixed, and the file format is fixed. It has full unit test coverage and randomised black box testing, and the README mentions companies like Shopify and Heroku running Bolt backed services with databases up to one terabyte in size. However, the original author Ben Johnson posted a message that he no longer has the time and energy to keep maintaining it. He considers the project complete and recommends people who want a more actively developed version look at the CoreOS fork called bbolt. The usage walkthrough starts with installation via go get, which also installs a bolt command line tool. To open a database you call bolt.Open with a filename, file permissions, and options. Bolt takes a file lock so two processes cannot open the same database file at once, you can pass a timeout option so it does not wait forever. All work happens inside transactions. Only one read write transaction can run at a time, but many read only transactions can run in parallel, and each transaction sees a consistent snapshot of the data as of when it started. The README shows how to start a read write transaction with db.Update, a read only transaction with db.View, and a batched form db.Batch that groups concurrent writes from multiple goroutines into fewer disk syncs at the cost of possibly retrying your function. There is also a lower level db.Begin for manual control. The rest of the README, indicated by its table of contents, goes deeper into buckets (named groups of keys), key and value pairs, iteration including prefix and range scans, nested buckets, backups, statistics, a read only mode, mobile use on iOS and Android, comparisons with relational databases and with LevelDB, RocksDB, and LMDB, plus caveats, limitations, and a list of other projects using Bolt. The full README is longer than what was shown.
Pure-Go embedded key-value database that stores everything in a single file, with ACID transactions and a tiny API. Project is archived in favour of CoreOS bbolt fork.
Mainly Go. The stack also includes Go, mmap.
Dormant — no commits in 2+ years (last push 2018-03-02).
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.