Skip to content

NEDB v0.6.0 Release Notes

Pre-release
Pre-release

Choose a tag to compare

@ethgr0wth ethgr0wth released this 14 Jun 20:08

nedb-engine + nedb-studio · INTERCHAINED, LLC · June 2026


nedb-engine v0.6.0 — RESP2 + Encryption + Snapshots

The headline release. nedbd now speaks the Redis wire protocol natively — redis-cli, redis-benchmark, and every Redis client library in every language connects without modification. Combined with AES-256-GCM at-rest encryption, Redis-style AOF persistence with snapshot checkpoints, and SQL/Redis/Python adapters, NEDB is a time-traveling, verifiable, encrypted Redis replacement.

pip install nedb-engine

# Generate a TMK (save it somewhere safe)
TMK=$(python3 -c "import os; print(os.urandom(32).hex())")

# Start the server — encrypted + redis-cli compatible
NEDB_TMK=$TMK NEDBD_RESP2_PORT=6379 nedbd

# Boot log:
#   encryption: AES-256-GCM enabled (NEDB_TMK configured)
#   [mydb] backfill-encrypting existing log…   (first run only)
#   nedbd 0.6.0 — http://127.0.0.1:7070  data=./nedb-data  auth=off
#   resp2  — redis://  127.0.0.1:6379  (RESP2 wire protocol)

# Connect with redis-cli
redis-cli -p 6379 PING
redis-cli -p 6379 SELECT mydb
redis-cli -p 6379 HSET user:1 name Ada age 31
redis-cli -p 6379 EVAL "FROM users WHERE status = \"active\" LIMIT 5" 0

What's new in v0.6.0

RESP2 Wire Protocol (NEDBD_RESP2_PORT)

nedbd runs a second TCP server on the port you specify, speaking RESP2 (Redis Serialization Protocol v2). Every Redis client connects natively — no proxy, no adapter, no Redis installation.

  • SELECT <name> — opens a named NEDB database (replaces Redis's integer 0-15 DBs)
  • EVAL "<NQL>" 0 — NQL pass-through: run any NQL query, rows returned as JSON strings
  • All major command groups: SET/GET/DEL/EXISTS/INCR/INCRBY/DECR, HSET/HGET/HGETALL/HDEL, SADD/SMEMBERS/SISMEMBER/SREM/SCARD, LPUSH/RPUSH/LRANGE/LLEN/LPOP/RPOP, KEYS/TYPE/DBSIZE/FLUSHDB
  • Unsupported commands (EXPIRE/TTL, SUBSCRIBE/PUBLISH, MULTI/EXEC) return clear -ERR with a roadmap note — never silently wrong

AES-256-GCM Encryption at Rest (NEDB_TMK)

Double-envelope key architecture: a random per-database DEK is wrapped by an external TMK (Table Master Key).

  • Encrypts the AOF, snapshot.json, and BlobStore chunks
  • Auto backfill-encrypt: enabling NEDB_TMK on an existing unencrypted database rewrites the entire AOF encrypted in place (atomic) on first open — visible in boot logs
  • Key rotation: db.rewrap_key(old_tmk, new_tmk) re-wraps the DEK without touching any data
  • cryptography is now a bundled required dependency — encryption just works, no separate install

TMK sources (priority order)

  1. NEDB(path, tmk=bytes) — programmatic
  2. NEDB_TMK=<64-char hex> — environment variable
  3. NEDB_TMK_FILE=/path/to/keyfile — raw bytes from a file

Full changelog since v0.4.2

Version Feature
v0.5.0 Snapshot checkpoints (db.checkpoint()), TTL/expiry (ttl_s=, expire(), sweep()), GROUP BY aggregations (COUNT/SUM/AVG/MIN/MAX in NQL)
v0.5.1 nedbd auto-checkpoints all databases on SIGTERM/SIGINT — synchronized restart; O(delta) startup
v0.5.2 BlobStore (Cascade files) persisted in snapshots — get_file(), Merkle proofs survive restart
v0.5.3 AES-256-GCM encryption at rest — AOF, snapshots, blob chunks; NEDB_TMK env; key rotation
v0.5.4 nedbd Manager wires NEDB_TMK — all databases encrypted when env is set
v0.5.5 cryptography bundled as required dep — no separate install needed
v0.5.6 Auto backfill-encrypt existing plaintext AOF on first encrypted open (atomic, visible in boot log)
v0.5.7 Eager database open at startup — backfill + snapshot load shows in boot log
v0.6.0 RESP2 wire protocol — drop-in Redis replacement; EVAL "<NQL>" 0 pass-through

Feature matrix vs Redis / MariaDB

Feature NEDB Redis MariaDB
Key/value + hash/set/list ✓ RESP2
SQL SELECT/INSERT/UPDATE/DELETE ✓ adapter
Full-text search ✓ inverted index — (RediSearch) ✓ FULLTEXT
Graph relations + TRAVERSE ✓ time-travel aware — (RedisGraph)
Time-travel reads (AS OF seq)
Hash-chain integrity (verify) ✓ BLAKE2b
Replay protection + idempotency ✓ nonce + idem key
Encryption at rest ✓ AES-256-GCM ✓ enterprise
Snapshot checkpoints ✓ chain-anchored ✓ RDB
GROUP BY aggregations ✓ NQL native — Lua
Versioned file store + Merkle ✓ Cascade
RESP2 wire (redis-cli) NEDBD_RESP2_PORT
Natural-language queries + writes ✓ Studio + NQL

Full feature set (cumulative)

  • Hash-chained append-only log — nonce-enforced replay protection, idempotency, MVCC time-travel (AS OF seq), tamper-evident verify()
  • NQLFROM t [AS OF n] [WHERE …] [SEARCH "text"] [ORDER BY f] [TRAVERSE rel] [LIMIT n] [GROUP BY f COUNT|SUM|AVG|MIN|MAX]
  • Relations — first-class graph edges with O(1) traversal, time-travel aware
  • Indexes — eq (hash), ordered (bisect), full-text inverted — maintained incrementally
  • Cascade compression — content-defined chunking + dedup + zlib/LZMA tiers, Merkle proofs per file version (anchorable on-chain)
  • SQL adaptersql_exec(db, sql) translates SELECT/INSERT/UPDATE/DELETE to NQL/NEDB
  • Redis adapterRedisCompat(db).execute(cmd, *args) — 30+ commands
  • Auto-indexingAutoIndexDB(db, threshold=5) creates indexes from query patterns
  • nedbd — HTTP/JSON API + RESP2 wire protocol; multi-database, bearer auth, CORS, auto-checkpoint on shutdown
  • Benchmark suitebench/benchmarks.py with reproducible baselines in bench/RESULTS.md

Install

pip install nedb-engine            # v0.6.0 — everything included
pip install --upgrade nedb-engine  # upgrade from any earlier version

Requires: Python 3.8+ · cryptography>=41 (bundled — no separate install)



nedb-studio v0.3.2 — phpMyAdmin for NEDB

A Portal-powered workspace over the NEDB engine — prompt-to-database, then deploy, query, and edit in natural language. Live at studio.interchained.org

git clone https://github.com/aiassistsecure/nedb-studio
cd nedb-studio && npm install
PORT=3129 npm run build && PORT=3129 npm run start

What's in v0.3.2

The two-way console

Ask a question → NQL → results. Ask to add/change a record → the model shows the exact row it would write (editable, with Regenerate and Cancel) → Commit → nedbd writes it. Merge semantics on update.

Language tabs: NQL / SQL / Redis

  • NQL — native NEDB query language, full grammar
  • SQL — SELECT translates to NQL and runs; INSERT/UPDATE/DELETE surface an editable preview
  • Redis — HGETALL/KEYS/SMEMBERS translate to NQL and run

/databases — deploy and operate live databases

  • Deploy a generated scaffold or sample database directly to a running nedbd
  • Schema graph (persisted in _studio/schema on deploy, shown by default as the first tab)
  • Browse collections, verify hash-chain integrity, view the append-only log
  • Connection snippets (curl, Python)

/settings — connection config

  • NEDB_URL env-first with runtime override
  • Encryption status badge● AES-256-GCM (green) or ● plaintext (amber) from nedbd health check
  • AiAssist gateway status and UI preferences

NL→write intent classification

The model classifies read vs write intent first. Writes preview the exact proposed row — all fields editable, Regenerate, Cancel — before anything is committed to the database.

Configuration

# .env
AIASSIST_API_KEY=your-key         # AI generation + NL→NQL + NL→write
NEDB_URL=http://127.0.0.1:7070    # nedbd HTTP server
NEDB_TMK=<64-char hex>            # optional: encryption status shown in Settings
PORT=3129                          # studio app port (separate from VITE_PORT in dev)

Architecture

The studio is a thin HTTP client of a running nedbd — it holds zero database state. All persistence, integrity, time-travel, and encryption live in the engine.


License

  • nedb-engine — Apache-2.0
  • nedb-studio — GPL-3.0-or-later
  • sentinel-blocks — GPL-3.0-or-later

© 2026 INTERCHAINED, LLC — interchained.org · powered by AiAssist