bun-sqlite-key-value is a high-performance key-value store (v1.13.1) built on bun:sqlite, optimized for Bun runtime with V8 serialization as a faster JSON alternative. It offers 3-5x speed improvement over other Node.js key-value stores by leveraging Bun's native SQLite bindings and a custom serialization format. Released actively, it provides a simple API for caching and persistent storage with automatic schema management and optional TTL support. It ships with TypeScript types and requires no external SQLite driver, making it a lean choice for Bun projects needing a fast local KV store.
npm install bun-sqlite-key-valueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating an in-memory key-value store, setting/getting objects, deleting a key, and closing the store.
Use consistent key casing (e.g., lowercase with colons).
Avoid storing functions, Symbols, or non-serializable objects.
Set a reasonable TTL and rely on periodic cleanup or explicit expiration checks.
Update from `const kv = KeyValue(...)` to `const kv = new KeyValue(...)`.
Upgrade Bun to v0.5.0 or later.
Run `bun add bun-sqlite-key-value` to install.
Use `const kv = new KeyValue({ path: ':memory:' })`.Use `import` syntax and ensure Node version >= 12 or run with Bun.
Use a file path or `:memory:` correctly. Check permissions.
No dependency data recorded yet.