RX Data Store
Skill by ara.so — Daily 2026 Skills collection.
RX is an embedded data store for JSON-shaped data. Encode once, then query the encoded document in place — no parsing, no object graph, no GC pressure. Think of it as no-SQL SQLite: unstructured data with database-style random access.
Key benefits:
- O(1) array access, O(log n) object key lookup on encoded data
- Automatic deduplication of values and shared schemas
- Text-safe encoding (copy-paste friendly, no binary tooling needed)
- Minimal heap allocations (~10 vs millions for JSON parsing)
- ~18x compression on real deployment manifests (92 MB → 5.1 MB)
Installation
Core API
String API (most common)
Uint8Array API (performance-critical paths)
Inspect API (lazy AST)
Escape hatch to underlying buffer
Encoding Options
If the encoder used external refs, pass the same dictionary to the decoder:
CLI
Full CLI flags:
Shell completions:
Tip — paged, colorized viewing:
Proxy Behavior
The value returned by parse/open is read-only:
Supported operations on the Proxy:
- Property access:
data.key,data[0] Object.keys(),Object.entries(),Object.values()for...of,for...inArray.isArray().map(),.filter(),.find(),.reduce()- Spread and destructuring
JSON.stringify()
Common Patterns
Build-step: convert JSON artifact to RX
Runtime: sparse read from large RX file
Streaming encode to stdout
Using external refs for cross-document deduplication
Low-level inspect traversal (zero allocation)
Type-safe usage pattern
Format Reference
RX is a text encoding — not human-readable like JSON, but safe to copy-paste.
Every value is read right-to-left. The parser scans left past base64 digits to find a tag character:
Tags: + integer · * decimal · , string · ' ref/literal · : object · ; array · ^ pointer · . chain · # index
When to Use RX vs Alternatives
Troubleshooting
TypeError: Cannot set property on decoded value
The Proxy returned by parse/open is read-only by design. To mutate, spread into a plain object first:
Decoded value looks correct but instanceof Array fails
Use Array.isArray(val) instead — this is correctly intercepted by the Proxy.
External refs mismatch / wrong values decoded
Ensure the exact same refs dictionary (same keys, same arrays, same order) is passed to both stringify/encode and parse/open.
CLI not found after global install
Inspecting encoded bytes
Or use the live viewer at rx.run — paste RX or JSON directly.
Performance: lookups slower than expected
Ensure indexes threshold is set appropriately when encoding. For large objects (e.g., 35k keys), use indexes: 0 to index all containers:
Resources
- rx.run — live web viewer, paste RX or JSON to inspect
- docs/rx-format.md — full format spec with grammar and railroad diagrams
- docs/cursor-api.md — low-level zero-allocation cursor API
- samples/ — example datasets (route manifest, RPG state, emoji metadata, sensor telemetry)


