An embedded, single-file key-value store for OCaml, inspired by BoltDB and LMDB.
OCaml 88.6%
Dune 4.0%
Other 7.4%
4 1 0

Clone this repository

https://tangled.org/desertthunder.dev/lithos
git@tangled.org:desertthunder.dev/lithos

For self-hosted knots, clone URLs may differ based on your setup.

README.md

Lithos#

An embedded, single-file key-value store for OCaml, inspired by BoltDB and LMDB. It offers ACID transactions, B-tree–backed pages, and copy-on-write MVCC with a minimal API.

CLI Usage#

Initialize a Database#

Create a new lithos database with default 4KB page size:

lithos init mydata.db
# Or specify a custom page size:
lithos init mydata.db --page-size 8192

Display Database Information#

View metadata about an existing database:

$ lithos info mydata.db
  Database: mydata.db
  Version: 1
  Page size: 4096 bytes
  Root bucket: None

Development#

Setup#

opam switch create lithos 5.3.0
eval $(opam env)

opam install dune alcotest checkseum fmt logs cmdliner

Commands#

dune build

# Test
dune test

# Run CLI
dune exec lithos -- <command> [args]