# Keyv Simple key-value storage with support for multiple backends - [Full LLM Content](https://keyv.org/llms-full.txt) ## Documentation - [Getting Started](https://keyv.org/docs/) - Install Keyv, store a value in seconds, and learn who uses it and what it can do. - [Options](https://keyv.org/docs/options/) - Constructor options for Keyv — store, namespace, TTL, serialization, compression, encryption, stats, and more. - [Properties](https://keyv.org/docs/properties/) - Instance properties on Keyv — store, namespace, TTL, serialization, compression, encryption, stats, sanitize, and more. - [Methods](https://keyv.org/docs/methods/) - Keyv methods — set, get, delete, has, batch APIs, raw access, iterator, disconnect, encode, and decode. - [Events and Errors](https://keyv.org/docs/events-and-errors/) - Error events, when errors throw, telemetry events, and symbols. - [Hooks](https://keyv.org/docs/hooks/) - before/after hooks for get, set, delete, has, clear, disconnect, and raw APIs. Includes deprecated PRE_/POST_ aliases. - [Namespaces](https://keyv.org/docs/namespaces/) - Isolate keys that share a backend. Namespace lives on the storage adapter in v6. - [Encode and Decode](https://keyv.org/docs/encode-and-decode/) - Serialization, compression, and encryption pipeline. Built-in JSON serializer, SuperJSON, MessagePack, and custom adapters. - [Sanitization](https://keyv.org/docs/sanitization/) - Strip SQL, Mongo, path-traversal, and control-character patterns from keys and namespaces. - [Using Map and LRU](https://keyv.org/docs/using-map-and-lru/) - Use Map, quick-lru, lru.min, or BigMap as the Keyv store. How KeyvMemoryAdapter wraps them. - [Statistics](https://keyv.org/docs/statistics/) - Enable KeyvStats for hits, misses, sets, deletes, errors, and per-key LRU frequency maps. - [Logging & Telemetry](https://keyv.org/docs/logging-and-telemetry/) - stat:* telemetry events, eventLogger (Pino/Winston), and how stats subscribe to the same events. - [Detect Capabilities](https://keyv.org/docs/detect-capabilities/) - detectKeyv, detectKeyvStorage, compression, serialization, encryption, and keyvStorageCapability. - [Legacy Storage Adapters](https://keyv.org/docs/legacy-storage-adapters/) - How KeyvBridgeAdapter wraps v5 relative-TTL adapters and async Map-like stores. - [Browser, Node, and Bun Support](https://keyv.org/docs/browser-node-and-bun/) - Runtime support for Node.js, Bun, and browsers. Engines, Web Crypto, and what to install where. - [Test Suite](https://keyv.org/docs/test-suite/) - [Storage Adapters](https://keyv.org/docs/storage-adapters/overview/) - Official backends, native TTL, how to use an adapter, benchmarks, and writing your own. - [@keyv/redis](https://keyv.org/docs/storage-adapters/redis/) - [@keyv/valkey](https://keyv.org/docs/storage-adapters/valkey/) - [@keyv/postgres](https://keyv.org/docs/storage-adapters/postgres/) - [@keyv/mysql](https://keyv.org/docs/storage-adapters/mysql/) - [@keyv/mongo](https://keyv.org/docs/storage-adapters/mongo/) - [@keyv/sqlite](https://keyv.org/docs/storage-adapters/sqlite/) - [@keyv/memcache](https://keyv.org/docs/storage-adapters/memcache/) - [@keyv/etcd](https://keyv.org/docs/storage-adapters/etcd/) - [@keyv/dynamo](https://keyv.org/docs/storage-adapters/dynamo/) - [@keyv/cloudflare-kv](https://keyv.org/docs/storage-adapters/cloudflare-kv/) - [@keyv/bigmap](https://keyv.org/docs/storage-adapters/bigmap/) - [Third-Party Storage Adapters](https://keyv.org/docs/storage-adapters/third-party/) - Community storage adapters and how to implement KeyvStorageAdapter. - [Serialization](https://keyv.org/docs/serialization/overview/) - Built-in JSON serializer plus SuperJSON and MessagePack packages. - [@keyv/serialize-superjson](https://keyv.org/docs/serialization/superjson/) - [@keyv/serialize-msgpackr](https://keyv.org/docs/serialization/msgpackr/) - [Compression](https://keyv.org/docs/compression/overview/) - Gzip, Brotli, and LZ4 compression adapters for Keyv. - [@keyv/compress-gzip](https://keyv.org/docs/compression/compress-gzip/) - [@keyv/compress-brotli](https://keyv.org/docs/compression/compress-brotli/) - [@keyv/compress-lz4](https://keyv.org/docs/compression/compress-lz4/) - [Encryption](https://keyv.org/docs/encryption/overview/) - Encrypt values at rest with Node.js crypto or the Web Crypto API. - [@keyv/encrypt-node](https://keyv.org/docs/encryption/encrypt-node/) - [@keyv/encrypt-web](https://keyv.org/docs/encryption/encrypt-web/) - [AI Agent Skill](https://keyv.org/docs/migration/ai-agent-skill/) - Upgrade from Keyv v4 or v5 to v6 with a coding agent. Point it at https://keyv.org/skills/migrate, or install the keyv-migrate Agent Skill. - [v4 to v5 Migration](https://keyv.org/docs/migration/v4-to-v5/) - [v5 to v6 Migration](https://keyv.org/docs/migration/v5-to-v6/) - [Versioning & Release Tags](https://keyv.org/docs/migration/versioning/) ## API Reference - Not available. ## Changelog - [Changelog](https://keyv.org/changelog) - [v6.1.0](https://keyv.org/changelog/v6-1-0) (October 6, 2026) - [v6.0.0-rc.1](https://keyv.org/changelog/v6-0-0-rc-1) (August 3, 2026) - [v6.0.0-beta.4](https://keyv.org/changelog/v6-0-0-beta-4) (June 18, 2026) - [v6.0.0-beta.3](https://keyv.org/changelog/v6-0-0-beta-3) (June 11, 2026) - [v6.0.0-beta.1](https://keyv.org/changelog/v6-0-0-beta-1) (April 1, 2026) - [v6.0.0-alpha.4](https://keyv.org/changelog/v6-0-0-alpha-4) (March 27, 2026) - [v6.0.0-alpha.3](https://keyv.org/changelog/v6-0-0-alpha-3) (March 22, 2026) - [v6.0.0-alpha.2](https://keyv.org/changelog/v6-0-0-alpha-2) (March 4, 2026) - [6.0.0-alpha.1](https://keyv.org/changelog/6-0-0-alpha-1) (February 26, 2026) - [2026-01-20](https://keyv.org/changelog/2026-01-20) (January 21, 2026) - [2025-12-26](https://keyv.org/changelog/2025-12-26) (December 26, 2025) - [2025-12-10](https://keyv.org/changelog/2025-12-10) (December 10, 2025) - [2025-11-20](https://keyv.org/changelog/2025-11-20) (November 21, 2025) - [2025-11-17](https://keyv.org/changelog/2025-11-17) (November 18, 2025) - [2025-11-11](https://keyv.org/changelog/2025-11-11) (November 11, 2025) - [2025-11-04](https://keyv.org/changelog/2025-11-04) (November 4, 2025) - [2025-10-25](https://keyv.org/changelog/2025-10-25) (October 25, 2025) - [2025-10-18](https://keyv.org/changelog/2025-10-18) (October 18, 2025) - [2025-10-09](https://keyv.org/changelog/2025-10-09) (October 10, 2025) - [2025-10-03](https://keyv.org/changelog/2025-10-03) (October 3, 2025)