A key-value store, not a server to run
Flint is an embedded, single-binary key-value store: a persistent append-only log with an in-memory index. Point it at a directory and get a durable, crash-safe store that is instantly fast. No server, no JVM, no cluster.
Watch it work
This is the real model running in your browser: every write appends a record to the log, the in-memory index points at the latest one, and compaction rewrites only the live keys.
One append-only log per store, one hash map holding the latest offset for every live key.
Every write appends a CRC-checked record to the active segment. When it passes its size cap, it rolls to a new file. Old data is never moved.
A hash map from each key to the file and byte offset of its latest value. That is why reads are one seek and writes are cheap.
Each record carries a CRC32. On open, Flint replays the log and stops a segment at the first torn or corrupt record, discarding a half-written trailing write.
Merges the live keys into one fresh segment and deletes the old ones, reclaiming the space held by overwritten versions and tombstones.
One binary, four ways to reach it.
Store::open(dir, cap) then set / get / delete / compact. Keys and values are arbitrary bytes.
flint serve speaks a tiny line protocol any client can use, even netcat. A background thread compacts as segments accumulate.
flint set greeting "hello", flint get greeting. One binary, one directory.
flint mcp exposes durable scratch memory over the Model Context Protocol: flint_set, flint_get, flint_delete that survive across sessions.
Three shapes of storage, and where Flint fits between them.
Redis is a dedicated server with persistence tuning and cluster management. Flint is a library and a directory, with nothing to operate for the single-node embedded case.
SQLite is a superb relational engine. When all you need is durable key to value, Flint is that shape directly: a log and a hash index, no SQL layer.
A hand-rolled JSON file is not crash-safe and rewrites everything on each change. Flint appends, indexes in memory, and survives torn writes.