Native, Simple Key-Value Store for Ruby.
PolyKV for Ruby is the simplest way to add persistence to your scripts and CLI tools. It provides a hash-like interface backed by a durable JSON file.
One API, Everywhere. This library is part of the PolyKV ecosystem. Use the same consistent API across 12+ languages.
-
💎 Ruby Way Feels just like a standard Ruby
Hash, but data persists across runs. -
📂 Standard Compliant Respects XDG Base Directory specs on Linux and standard AppData paths on Windows/macOS.
-
🚀 Fast & Simple No database servers to configure. Just a simple JSON file that you can inspect with any text editor.
gem install polykvrequire 'polykv'
# Init
kv = PolyKV.new("MyScript")
# 1. Save
kv.set_string("status", "pending")
kv.set_number("pid", 101)
# 2. Read
puts "Status: #{kv.get_string("status")}"
# 3. Update
kv.set_string("status", "done")
# 4. Delete
kv.remove("pid")
# 5. Clear All
kv.clear| Language | Verified Runtime (✅) | Build Only (🛠) |
|---|---|---|
| TypeScript | CLI (Node.js), Browser, React Native (iOS/Android) | - |
| Dart | Flutter (iOS/Android/macOS), CLI | - |
| Go | macOS, Linux, Windows, iOS, Android, CLI | - |
| Rust | macOS, iOS, Android, CLI | Linux, Windows |
| Swift | iOS, macOS, CLI | - |
| C++ | macOS, iOS, Android, CLI | - |
| Python | CLI, Web, Android | - |
| Kotlin | CLI, Web, Android | - |
| C# | CLI | Android, Windows |
| Java | CLI, Android | - |
| Ruby | CLI | - |
| PHP | CLI | - |
✅ Runtime Verified: Full CRUD operations verified via automated tests on actual devices/simulators.
MIT