@reddb-io/cli 1.21.0-rc.193 โ†’ 1.21.0-rc.195

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,74 +1,79 @@
1
- <p align="center">
2
- <h1 align="center">RedDB</h1>
3
- <p align="center"><strong>The AI-first multi-model database.</strong></p>
4
- <p align="center">Tables. Documents. Graphs. Vectors. KV. One engine. Ask it anything.</p>
1
+ <div align="center">
2
+
3
+ <h1>๐Ÿš€ RedDB</h1>
4
+
5
+ <p>
6
+ <strong>The AI-first multi-model database.</strong><br>
7
+ Tables ยท Documents ยท Graphs ยท Vectors ยท KV ยท Time-series ยท Queues ยท All in one engine. Ask it anything.
5
8
  </p>
6
9
 
7
- <p align="center">
8
- <a href="https://github.com/reddb-io/reddb/releases"><img src="https://img.shields.io/github/v/release/reddb-io/reddb?style=flat-square" alt="Release"></a>
9
- <a href="./LICENSE"><img src="https://img.shields.io/badge/license-BSL%201.1-blue?style=flat-square" alt="License"></a>
10
- <a href="https://www.npmjs.com/package/@reddb-io/cli"><img src="https://img.shields.io/npm/v/@reddb-io/cli?style=flat-square&label=npm" alt="npm"></a>
10
+ <p>
11
+ <a href="https://github.com/reddb-io/reddb/releases"><img src="https://img.shields.io/github/v/release/reddb-io/reddb?style=for-the-badge&color=ff2056&labelColor=0b0b0d" alt="Release"></a>
12
+ <a href="https://github.com/reddb-io/reddb/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/reddb-io/reddb/ci.yml?branch=main&style=for-the-badge&label=CI&labelColor=0b0b0d" alt="CI"></a>
13
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-BSL%201.1-blue?style=for-the-badge&labelColor=0b0b0d" alt="License"></a>
14
+ <img src="https://img.shields.io/badge/rust%20ยท%20sql%20ยท%20typescript-555?style=for-the-badge&labelColor=0b0b0d&label=built%20with" alt="Built with">
11
15
  </p>
12
16
 
17
+ </div>
18
+
19
+ ---
20
+
21
+ ## ๐ŸŽฏ Why RedDB?
22
+
23
+ Stop running Postgres + Neo4j + Pinecone + Redis + Mongo + InfluxDB + RabbitMQ. One file. One engine. One query language. All seven models work together seamlessly.
24
+
13
25
  > [!IMPORTANT]
14
- > In RedDB, a `collection` is the named logical container for data. Tables, documents, key-value, graphs,
15
- > vectors, time-series, and queues are the user-facing models or semantics you use on top of collections.
16
- > A collection is not a separate hierarchy layer that contains multiple tables and documents beneath it.
17
- > Instead, `users` can be a collection used as a table, `events` can be a collection used for documents,
18
- > and `config` can be a collection used as KV. Some models can also coexist in the same collection.
26
+ > **Collections:** In RedDB, a `collection` is the named logical container for data. Tables, documents, key-value, graphs, vectors, time-series, and queues are the models you layer on top. `users` can be a table, `events` can be documents, `config` can be KV โ€” in the same collection or spread across many. Choose your model; collections unite them.
19
27
 
20
28
  ---
21
29
 
22
- ## The Killer Feature: `ASK`
30
+ ## โœจ The Killer Feature: `ASK`
23
31
 
24
32
  ```sql
25
33
  ASK 'who owns passport AB1234567 and what services do they use?'
26
34
  ```
27
35
 
28
- One command. RedDB searches across tables, graphs, vectors, documents, and key-value stores -- builds context -- calls an LLM -- returns a natural-language answer. No pipelines. No glue code. No other database does this.
36
+ One command. RedDB searches across tables, graphs, vectors, documents, and key-value stores โ€” builds context โ€” calls an LLM โ€” returns a natural-language answer. No pipelines. No glue code. No other database does this.
29
37
 
30
38
  ---
31
39
 
32
- ## 7 Data Models, 1 Engine
40
+ ## ๐Ÿ“Š 7 Data Models, 1 Engine
33
41
 
34
- Stop running Postgres + Neo4j + Pinecone + Redis + Mongo + InfluxDB + RabbitMQ. RedDB unifies them.
35
-
36
- The key mental model is simple: the model is how you work with the data, and the collection is where
37
- that data lives.
42
+ The mental model: your **model** is how you query (table, graph, vector, etc.), your **collection** is where the data lives. Mix and match freely.
38
43
 
39
44
  ```sql
40
- -- Relational rows
45
+ -- ๐Ÿ“‹ Relational rows
41
46
  INSERT INTO users (name, email) VALUES ('Alice', 'alice@co.com')
42
47
 
43
- -- JSON documents
44
- INSERT INTO logs DOCUMENT VALUES ({"level":"info","msg":"login"})
48
+ -- ๐Ÿ“„ JSON documents โ€” inline JSON syntax
49
+ INSERT INTO logs DOCUMENT VALUES ({"level": "info", "msg": "login"})
45
50
 
46
- -- Graph edges
51
+ -- ๐Ÿ”— Graph edges
47
52
  INSERT INTO network EDGE (label, from_rid, to_rid) VALUES ('CONNECTS', 102, 103)
48
53
 
49
- -- Vector similarity search
54
+ -- ๐ŸŽฏ Vector similarity search
50
55
  SEARCH SIMILAR TEXT 'anomaly detected' COLLECTION events
51
56
 
52
- -- Key-value
57
+ -- ๐Ÿ”‘ Key-value
53
58
  KV PUT config.theme = 'dark'
54
59
 
55
- -- Time-series metrics (with retention & downsampling)
60
+ -- โฑ๏ธ Time-series (retention & downsampling)
56
61
  CREATE TIMESERIES cpu_metrics RETENTION 90 d
57
- INSERT INTO cpu_metrics (metric, value, tags) VALUES ('cpu.idle', 95.2, {"host":"srv1"})
62
+ INSERT INTO cpu_metrics (metric, value, tags) VALUES ('cpu.idle', 95.2, {"host": "srv1"})
58
63
 
59
- -- Hypertables + partition TTL + continuous aggregates (logs / events / telemetry)
64
+ -- ๐Ÿ“ฆ Hypertables (logs, events, telemetry)
60
65
  CREATE HYPERTABLE access_log TIME_COLUMN ts CHUNK_INTERVAL '1d' TTL '90d'
61
66
 
62
- -- Append-only tables (audit, ledger, immutable events)
67
+ -- ๐Ÿ“‘ Append-only (audit, ledger, immutable)
63
68
  CREATE TABLE audit_log (id BIGINT, action TEXT) APPEND ONLY
64
69
 
65
- -- Message queues (FIFO, priority, consumer groups)
70
+ -- ๐Ÿ“จ Message queues (FIFO, priority, consumer groups)
66
71
  CREATE QUEUE tasks MAX_SIZE 10000
67
- QUEUE PUSH tasks {"job":"process","id":123}
72
+ QUEUE PUSH tasks {"job": "process", "id": 123}
68
73
  QUEUE POP tasks
69
74
  ```
70
75
 
71
- Same file. Same engine. Same query language.
76
+ Same file. Same engine. Same query language โ€” everything lives in one `.rdb` file.
72
77
 
73
78
  Want to use RedDB as your log store? Start with the
74
79
  [Logs Quickstart](./docs/guides/logs-quickstart.md) or the full
@@ -76,44 +81,46 @@ Want to use RedDB as your log store? Start with the
76
81
 
77
82
  ---
78
83
 
79
- ## AI-Native From Day One
84
+ ## ๐Ÿง  AI-Native From Day One
80
85
 
81
86
  ```sql
82
87
  -- Semantic search without managing vectors yourself
83
88
  SEARCH SIMILAR TEXT 'suspicious login' COLLECTION logs USING groq
84
89
 
85
- -- Auto-embed on insert -- vectors are created for you
90
+ -- Auto-embed on insert โ€” vectors are created automatically
86
91
  INSERT INTO articles (title, body) VALUES ('AI Safety', 'Alignment research...')
87
92
  WITH AUTO EMBED (body) USING openai
88
93
 
89
- -- Context search: find everything related to an entity across all models
94
+ -- Context search across all data models
90
95
  SEARCH CONTEXT '192.168.1.1' FIELD ip DEPTH 2
91
96
 
92
- -- Ask questions in plain English
97
+ -- Ask questions in plain English, get grounded answers
93
98
  ASK 'what vulnerabilities affect host 10.0.0.1?' USING anthropic
94
99
  ```
95
100
 
96
- RedDB retrieves context from every data model, feeds it to the LLM, and gives you a grounded answer. RAG built into the database layer.
101
+ RAG built into the database layer. RedDB retrieves context from every data model and feeds it to the LLM.
97
102
 
98
103
  ---
99
104
 
100
- ## 11 AI Providers
105
+ ## ๐Ÿค– 11 AI Providers
106
+
107
+ Swap providers with a keyword. No code changes. Full parity across ASK, embeddings, and model selection.
101
108
 
102
- Swap providers with a keyword. No code changes.
109
+ | Provider | Keyword | API Key | ASK / Prompt | Embeddings |
110
+ |:---------|:--------|:-------:|:------------:|:----------:|
111
+ | **OpenAI** | `openai` | โœ… | โœ… | โœ… |
112
+ | **Anthropic** | `anthropic` | โœ… | โœ… | โ€”* |
113
+ | **Groq** | `groq` | โœ… | โœ… | โœ… |
114
+ | **OpenRouter** | `openrouter` | โœ… | โœ… | โœ… |
115
+ | **Together** | `together` | โœ… | โœ… | โœ… |
116
+ | **Venice** | `venice` | โœ… | โœ… | โœ… |
117
+ | **DeepSeek** | `deepseek` | โœ… | โœ… | โœ… |
118
+ | **HuggingFace** | `huggingface` | โœ… | โœ… | โœ… |
119
+ | **Ollama** | `ollama` | โ€” | โœ… | โœ… |
120
+ | **Local** | `local` | โ€” | feature-gated | feature-gated |
121
+ | **Custom URL** | `https://...` | varies | โœ… | โœ… |
103
122
 
104
- | Provider | Keyword | API Key | ASK / Prompt | Embeddings |
105
- |:------------|:---------------|:-------:|:------------:|:----------:|
106
- | OpenAI | `openai` | Yes | โœ… | โœ… |
107
- | Anthropic | `anthropic` | Yes | โœ… | rejected |
108
- | Groq | `groq` | Yes | โœ… | โœ… |
109
- | OpenRouter | `openrouter` | Yes | โœ… | โœ… |
110
- | Together | `together` | Yes | โœ… | โœ… |
111
- | Venice | `venice` | Yes | โœ… | โœ… |
112
- | DeepSeek | `deepseek` | Yes | โœ… | โœ… |
113
- | HuggingFace | `huggingface` | Yes | โœ… | โœ… |
114
- | Ollama | `ollama` | No | โœ… | โœ… |
115
- | Local | `local` | No | feature-gated | feature-gated |
116
- | Custom URL | `https://...` | depends | โœ… | โœ… |
123
+ *Anthropic does not offer embeddings; RedDB rejects embedding calls explicitly rather than re-routing to another provider.
117
124
 
118
125
  Most providers speak the OpenAI-compatible `POST /embeddings` shape;
119
126
  HuggingFace has its own (`POST /pipeline/feature-extraction/{model}`)
@@ -152,12 +159,12 @@ curl http://127.0.0.1:5000/config
152
159
 
153
160
  ---
154
161
 
155
- ## Probabilistic Data Structures
162
+ ## ๐ŸŽฒ Probabilistic Data Structures
156
163
 
157
- Built-in approximate data structures for real-time analytics at scale.
164
+ Built-in approximate data structures for real-time analytics at scale. Cardinality estimation, frequency analysis, and set membership all in one engine.
158
165
 
159
166
  ```sql
160
- -- HyperLogLog: count unique visitors (~0.8% error, ~16KB memory)
167
+ -- HyperLogLog: unique visitor count (~0.8% error, 16KB memory)
161
168
  CREATE HLL visitors
162
169
  HLL ADD visitors 'user1' 'user2' 'user3'
163
170
  HLL COUNT visitors
@@ -167,7 +174,7 @@ CREATE SKETCH click_counter WIDTH 2000 DEPTH 7
167
174
  SKETCH ADD click_counter 'button_a' 5
168
175
  SKETCH COUNT click_counter 'button_a'
169
176
 
170
- -- Cuckoo Filter: membership testing with deletion (unlike Bloom filters)
177
+ -- Cuckoo Filter: membership + deletion (unlike Bloom)
171
178
  CREATE FILTER active_sessions CAPACITY 500000
172
179
  FILTER ADD active_sessions 'session_abc'
173
180
  FILTER CHECK active_sessions 'session_abc'
@@ -176,18 +183,18 @@ FILTER DELETE active_sessions 'session_abc'
176
183
 
177
184
  ---
178
185
 
179
- ## Advanced Indexes
186
+ ## ๐Ÿ—‚๏ธ Advanced Indexes
180
187
 
181
- Beyond B-tree. Create the right index for your workload.
188
+ Beyond B-tree. Pick the right index for your access pattern.
182
189
 
183
190
  ```sql
184
- -- Hash index: O(1) exact-match lookups
191
+ -- Hash: O(1) exact-match lookups
185
192
  CREATE INDEX idx_email ON users (email) USING HASH
186
193
 
187
- -- Bitmap index: fast analytical queries on low-cardinality columns
194
+ -- Bitmap: analytical queries on low-cardinality columns
188
195
  CREATE INDEX idx_status ON orders (status) USING BITMAP
189
196
 
190
- -- R-Tree: spatial queries on geo data
197
+ -- R-Tree: spatial & geographic queries
191
198
  CREATE INDEX idx_loc ON sites (location) USING RTREE
192
199
  SEARCH SPATIAL RADIUS 48.8566 2.3522 10.0 COLLECTION sites COLUMN location LIMIT 50
193
200
  SEARCH SPATIAL NEAREST 48.8566 2.3522 K 5 COLLECTION sites COLUMN location
@@ -195,7 +202,7 @@ SEARCH SPATIAL NEAREST 48.8566 2.3522 K 5 COLLECTION sites COLUMN location
195
202
 
196
203
  ---
197
204
 
198
- ## SQL Extensions
205
+ ## ๐Ÿ”ง SQL Extensions
199
206
 
200
207
  RedDB extends SQL with `WITH` clauses for operational semantics:
201
208
 
@@ -218,7 +225,7 @@ INSERT INTO events (name) VALUES ('launch') WITH EXPIRES AT 1735689600000
218
225
 
219
226
  ---
220
227
 
221
- ## 6 Query Languages
228
+ ## ๐Ÿ”ค 6 Query Languages
222
229
 
223
230
  Write in whatever you think in. The engine auto-detects the language.
224
231
 
@@ -235,9 +242,9 @@ All six hit the same engine, same data, same indexes.
235
242
 
236
243
  ---
237
244
 
238
- ## Native Migrations โ€” No External Tools
245
+ ## ๐Ÿ”„ Native Migrations โ€” No External Tools
239
246
 
240
- Stop reaching for Flyway, Liquibase, Drizzle Migrate, or Sequelize migrations. RedDB handles schema and data migrations as first-class SQL commands.
247
+ Stop reaching for Flyway, Liquibase, Drizzle Migrate, or Sequelize. RedDB handles schema and data migrations as first-class SQL commands โ€” all in one transaction log.
241
248
 
242
249
  ```sql
243
250
  -- Register a migration
@@ -268,26 +275,26 @@ Every applied migration creates a **VCS commit** (RedDB's "Git for Data"). Rollb
268
275
 
269
276
  ---
270
277
 
271
- ## 48 Built-in Types
272
-
273
- Not just `TEXT` and `INTEGER`. RedDB understands your domain.
278
+ ## ๐Ÿ“ฆ 48 Built-in Types
274
279
 
275
- **Network:** `IpAddr`, `Ipv4`, `Ipv6`, `MacAddr`, `Cidr`, `Subnet`, `Port`
276
- **Geo:** `Latitude`, `Longitude`, `GeoPoint`
277
- **Locale:** `Country2`, `Country3`, `Lang2`, `Lang5`, `Currency`
278
- **Identity:** `Uuid`, `Email`, `Url`, `Phone`, `Semver`
279
- **Visual:** `Color`, `ColorAlpha`
280
- **Cross-model refs:** `NodeRef`, `EdgeRef`, `VectorRef`, `RowRef`, `KeyRef`, `DocRef`, `TableRef`, `PageRef`
281
- **Primitives:** `Integer`, `UnsignedInteger`, `Float`, `Decimal`, `BigInt`, `Text`, `Blob`, `Boolean`, `Json`, `Array`, `Enum`
282
- **Temporal:** `Timestamp`, `TimestampMs`, `Date`, `Time`, `Duration`
280
+ Not just `TEXT` and `INTEGER`. RedDB understands your domain โ€” validation on write, no parsing in your app.
283
281
 
284
- Validation on write. No parsing in your app.
282
+ | Category | Types |
283
+ |:---------|:------|
284
+ | **Network** | `IpAddr`, `Ipv4`, `Ipv6`, `MacAddr`, `Cidr`, `Subnet`, `Port` |
285
+ | **Geographic** | `Latitude`, `Longitude`, `GeoPoint` |
286
+ | **Locale** | `Country2`, `Country3`, `Lang2`, `Lang5`, `Currency` |
287
+ | **Identity** | `Uuid`, `Email`, `Url`, `Phone`, `Semver` |
288
+ | **Visual** | `Color`, `ColorAlpha` |
289
+ | **Cross-model Refs** | `NodeRef`, `EdgeRef`, `VectorRef`, `RowRef`, `KeyRef`, `DocRef`, `TableRef`, `PageRef` |
290
+ | **Primitives** | `Integer`, `UnsignedInteger`, `Float`, `Decimal`, `BigInt`, `Text`, `Blob`, `Boolean`, `Json`, `Array`, `Enum` |
291
+ | **Temporal** | `Timestamp`, `TimestampMs`, `Date`, `Time`, `Duration` |
285
292
 
286
293
  ---
287
294
 
288
- ## Backup & Recovery
295
+ ## ๐Ÿ’พ Backup & Recovery
289
296
 
290
- Built-in backup scheduler, WAL archiving, Change Data Capture (CDC), and Point-in-Time Recovery framework:
297
+ Built-in backup scheduler, WAL archiving, CDC, and Point-in-Time Recovery โ€” no sidecars required:
291
298
 
292
299
  ```bash
293
300
  # Poll real-time changes
@@ -308,7 +315,7 @@ PITR rollback, replica promotion), see
308
315
 
309
316
  ---
310
317
 
311
- ## KV REST API
318
+ ## ๐Ÿ”Œ KV REST API
312
319
 
313
320
  Every collection doubles as a key-value store with dedicated REST endpoints:
314
321
 
@@ -341,32 +348,26 @@ SHOW CONFIG red.ai
341
348
 
342
349
  ---
343
350
 
344
- ## 3 Deployment Modes
351
+ ## ๐ŸŒ 3 Deployment Modes
345
352
 
346
- | Mode | Think of it as... | Access via |
347
- |:-----|:-------------------|:-----------|
348
- | **Embedded** | SQLite | Rust API -- `RedDB::open("data.rdb")` |
349
- | **Server** | Postgres | RedWire + gRPC + HTTP listeners |
350
- | **Agent** | MCP tool | `red mcp` -- AI agent integration |
353
+ | Mode | Like | Access | Use Case |
354
+ |:-----|:-----|:-------|:---------|
355
+ | **Embedded** | SQLite | Rust API (`RedDB::open("data.rdb")`) | In-process, single machine |
356
+ | **Server** | Postgres | RedWire + gRPC + HTTP | Multi-client, networked |
357
+ | **Agent** | MCP Server | `red mcp` | Claude Code / AI agents |
351
358
 
352
- Same storage format across all three. Start embedded, scale to server, expose to agents -- no migration.
359
+ Same storage format. Start embedded, scale to server, expose to agents โ€” zero migration.
353
360
 
354
361
  ---
355
362
 
356
- ## Performance
363
+ ## โšก Performance
357
364
 
358
- > **Where RedDB wins.** Two scenarios in the canonical `duel-official`
359
- > benchmark show measurable wins over Postgres and Mongo today:
365
+ > **Where RedDB wins:** benchmarks show measurable wins over Postgres and Mongo today:
360
366
  >
361
- > - `typed_insert` โ€” RedDB โ‰ˆ **16ร— faster** than PostgreSQL on typed
362
- > single-row inserts.
363
- > - `disk_usage` โ€” RedDB โ‰ˆ **1.5ร— faster** than MongoDB on the
364
- > compact-write path.
367
+ > - `typed_insert` โ€” **16ร— faster** than PostgreSQL on typed single-row inserts
368
+ > - `disk_usage` โ€” **1.5ร— faster** than MongoDB on compact-write workloads
365
369
  >
366
- > See [`docs/perf/wins.md`](docs/perf/wins.md) for the cited sessions
367
- > and reproducible commands. The honest counterpart โ€” gaps where RedDB
368
- > is still behind โ€” lives at
369
- > [`docs/perf/when-not-reddb.md`](docs/perf/when-not-reddb.md).
370
+ > See [`docs/perf/wins.md`](docs/perf/wins.md) for reproducible benchmarks and [`docs/perf/when-not-reddb.md`](docs/perf/when-not-reddb.md) for the honest gaps where we're still behind.
370
371
 
371
372
  RedDB uses multiple optimization techniques for fast queries at scale:
372
373
 
@@ -386,25 +387,23 @@ RedDB uses multiple optimization techniques for fast queries at scale:
386
387
 
387
388
  ---
388
389
 
389
- ## Durability & Corruption Defense
390
+ ## ๐Ÿ›ก๏ธ Durability & Corruption Defense
390
391
 
391
- RedDB uses 7 layers of protection to keep your data safe:
392
+ Seven layers of protection โ€” tested and proven against power loss, torn writes, and crashes:
392
393
 
393
- | Layer | What it does |
394
- |:------|:-------------|
395
- | **File Lock** | Exclusive `flock` prevents two processes from writing the same `.rdb` file |
396
- | **Double-Write Buffer** | Pages written to `.rdb-dwb` first; survives torn writes on power loss |
397
- | **Header Shadow** | Copy of page 0 in `.rdb-hdr`; auto-recovers if header corrupts |
398
- | **Metadata Shadow** | Copy of page 1 in `.rdb-meta`; auto-recovers collection registry |
399
- | **fsync Discipline** | All critical writes followed by `sync_all()` (not just flush) |
400
- | **Two-Phase Checkpoint** | Crash-safe WALโ†’DB transfer with `checkpoint_in_progress` flag |
401
- | **Binary Store CRC32** | V3 files have CRC32 footer + atomic write-to-temp-then-rename |
402
-
403
- Every page has a CRC32 checksum (verified on read). Every WAL record has a CRC32 checksum. The binary store format (V3) includes a full-file CRC32 footer.
394
+ | Layer | Defense |
395
+ |:------|:---------|
396
+ | **File Lock** | Exclusive `flock` โ€” prevents concurrent writes to `.rdb` |
397
+ | **Double-Write Buffer** | Pages in `.rdb-dwb` first โ€” survives power loss |
398
+ | **Header Shadow** | Backup page 0 in `.rdb-hdr` โ€” auto-recovers corruption |
399
+ | **Metadata Shadow** | Backup page 1 in `.rdb-meta` โ€” recovers collection registry |
400
+ | **fsync Discipline** | `sync_all()` after every critical write โ€” no flush-only shortcuts |
401
+ | **Two-Phase Checkpoint** | WALโ†’DB with `checkpoint_in_progress` flag โ€” crash-safe |
402
+ | **CRC32 Checksum** | Every page, every WAL record, full-file footer โ€” detects bitrot |
404
403
 
405
404
  ---
406
405
 
407
- ## Eventual Consistency
406
+ ## ๐Ÿ”€ Eventual Consistency
408
407
 
409
408
  RedDB supports per-field eventual consistency via an append-only transaction log with periodic consolidation. Inspired by CRDT principles (commutative, associative reducers), it enables high-throughput write patterns while guaranteeing convergence.
410
409
 
@@ -429,7 +428,7 @@ See the [Eventual Consistency Guide](https://reddb-io.github.io/reddb/#/guides/e
429
428
 
430
429
  ---
431
430
 
432
- ## Geographic Operations
431
+ ## ๐Ÿ—บ๏ธ Geographic Operations
433
432
 
434
433
  Built-in geo functions with no external dependencies. Supports both spherical (Haversine) and ellipsoidal (Vincenty/WGS-84) models.
435
434
 
@@ -462,7 +461,7 @@ Also available: destination point, bounding box, polygon area, spatial search (R
462
461
 
463
462
  ---
464
463
 
465
- ## Vector Clustering
464
+ ## ๐Ÿ“ˆ Vector Clustering
466
465
 
467
466
  Standalone K-Means and DBSCAN clustering on vector collections, with SIMD-accelerated distance computation and automatic parallelization.
468
467
 
@@ -482,11 +481,9 @@ K-Means uses parallel assignment (multi-threaded for datasets > 1K vectors). DBS
482
481
 
483
482
  ---
484
483
 
485
- ## Native Drivers
484
+ ## ๐Ÿš€ Native Drivers
486
485
 
487
- One connection-string API, four languages. Every driver accepts the same
488
- `connect(uri)` contract so application code ports across runtimes with zero
489
- ceremony.
486
+ One connection-string API, multiple languages. Same `connect(uri)` everywhere โ€” code ports across runtimes with zero ceremony.
490
487
 
491
488
  | Language | Package | Install | Backends |
492
489
  |-------------------|------------------|--------------------------------|-------------------------------------|
@@ -567,74 +564,87 @@ npx @reddb-io/cli@latest server --wire-bind 127.0.0.1:5050 --http-bind 127.0.0.1
567
564
 
568
565
  ---
569
566
 
570
- ## Quick Start
567
+ ## ๐Ÿš€ Quick Start
568
+
569
+ **Install the `red` binary:**
571
570
 
572
571
  ```bash
573
- # Install
574
572
  curl -fsSL https://raw.githubusercontent.com/reddb-io/reddb/main/install.sh | bash
575
- # The installer verifies the selected release asset against SHA256SUMS before install.
573
+ # Verifies SHA256 before install โ€ข auto-detects your OS + arch
574
+ ```
576
575
 
577
- # Start the server (wire: 5050, gRPC: 55055, HTTP: 5000)
578
- red server --wire-bind 127.0.0.1:5050 --grpc-bind 127.0.0.1:55055 --http-bind 127.0.0.1:5000 --path ./data.rdb
576
+ **Start the server:**
579
577
 
580
- # Insert data
578
+ ```bash
579
+ red server --wire-bind 127.0.0.1:5050 --http-bind 127.0.0.1:5000 --path ./data.rdb
580
+ # RedWire: 5050 ยท gRPC: 55055 ยท HTTP: 5000
581
+ ```
582
+
583
+ **Insert and query via HTTP:**
584
+
585
+ ```bash
581
586
  curl -X POST http://127.0.0.1:5000/query \
582
587
  -H 'content-type: application/json' \
583
- -d '{"query":"INSERT INTO hosts (ip, os) VALUES ('\''10.0.0.1'\'', '\''linux'\'')"}'
588
+ -d '{"query":"INSERT INTO hosts (ip, os) VALUES ('"'"'10.0.0.1'"'"', '"'"'linux'"'"')"}'
584
589
 
585
- # Query it
586
590
  curl -X POST http://127.0.0.1:5000/query \
587
591
  -H 'content-type: application/json' \
588
592
  -d '{"query":"SELECT * FROM hosts"}'
589
593
  ```
590
594
 
591
- Or via npm CLI launcher:
595
+ **Or via npm (no separate install):**
592
596
 
593
597
  ```bash
594
- npx @reddb-io/cli@latest server --wire-bind 127.0.0.1:5050 --http-bind 127.0.0.1:5000
598
+ npx @reddb-io/cli@latest server --http-bind 127.0.0.1:5000
595
599
  ```
596
600
 
597
- Or via Docker:
601
+ **Or Docker:**
598
602
 
599
603
  ```bash
600
- echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USER" --password-stdin # if GHCR requires auth
601
- docker run --rm -p 5050:5050 -p 55055:55055 -p 5000:5000 ghcr.io/reddb-io/reddb:latest
604
+ docker run --rm -p 5050:5050 -p 55055:55055 -p 5000:5000 \
605
+ ghcr.io/reddb-io/reddb:latest
602
606
  ```
603
607
 
604
- Or, if you only need the thin remote-only client (~7 MB image):
608
+ โ†’ See [`docs/deployment/docker.md`](./docs/deployment/docker.md) and [`docs/security/vault.md`](./docs/security/vault.md) for production setups.
605
609
 
606
- ```bash
607
- echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_USER" --password-stdin # if GHCR requires auth
608
- docker run --rm ghcr.io/reddb-io/reddb-client:latest red://reddb.example.com:5050 -c "SELECT 1"
609
- ```
610
+ ---
610
611
 
611
- For production-secure Docker (vault + secrets) and Kubernetes, see
612
- [`docs/deployment/docker.md`](./docs/deployment/docker.md)
613
- and [`docs/security/vault.md`](./docs/security/vault.md).
612
+ ## ๐Ÿ“‚ Architecture
614
613
 
615
- ---
614
+ RedDB ships as a Cargo workspace:
616
615
 
617
- ## Workspace layout
616
+ | Crate | Role |
617
+ |:------|:-----|
618
+ | `reddb` | Binary umbrella; houses the `red` CLI |
619
+ | `reddb-io-engine` | Storage engine, indexes, query execution |
620
+ | `reddb-io-client` | Rust driver with embedded, gRPC, HTTP transports |
621
+ | `reddb-io-wire` | RedWire protocol vocabulary & framing |
622
+ | `reddb-io-rql` | RQL parser and semantic analyzer |
623
+ | `reddb-io-types` | Type system, value codec, cross-model refs |
618
624
 
619
- RedDB ships as a Cargo workspace. The `reddb` crate is the
620
- umbrella that hosts the `red` binary; the engine, thin client,
621
- gRPC stubs, and wire vocabulary live in sibling crates.
625
+ ---
622
626
 
623
- ## Links
627
+ ## ๐Ÿ“š Resources
624
628
 
625
- - [Documentation](https://reddb-io.github.io/reddb)
626
- - [GitHub](https://github.com/reddb-io/reddb)
627
- - [npm driver package](https://www.npmjs.com/package/reddb)
628
- - [npm CLI launcher](https://www.npmjs.com/package/@reddb-io/cli)
629
- - [Releases](https://github.com/reddb-io/reddb/releases)
630
- - [Release Policy](./docs/release-policy.md)
631
- - [Support Policy](./SUPPORT.md)
632
- - [Security Policy](./SECURITY.md)
633
- - [Public Contract Matrix](./docs/reference/contract-matrix.md) โ€” every doc'd promise mapped to a test or a planned-status note
629
+ | Resource | Purpose |
630
+ |:---------|:---------|
631
+ | ๐Ÿ“– [Documentation](https://reddb-io.github.io/reddb) | Full guides, API reference, tutorials |
632
+ | ๐Ÿ™ [GitHub](https://github.com/reddb-io/reddb) | Source code, issues, discussions |
633
+ | ๐Ÿ“ฆ [npm CLI](https://www.npmjs.com/package/@reddb-io/cli) | Install & run via `npx` |
634
+ | ๐Ÿ“ค [npm Drivers](https://www.npmjs.com/package/@reddb-io/sdk) | Node/Bun/Deno SDK |
635
+ | ๐Ÿ“‹ [Release Notes](./docs/release-policy.md) | Version history & changelog |
636
+ | ๐Ÿ›ก๏ธ [Security Policy](./SECURITY.md) | Reporting vulnerabilities |
637
+ | โœ… [Contract Matrix](./docs/reference/contract-matrix.md) | Every promise โ†’ test or plan |
634
638
 
635
639
  ---
636
640
 
637
- **Business Source License 1.1** -- source-available; free for self-hosted, internal, and non-production use. Offering RedDB as a managed/hosted database service to third parties requires a commercial license. Converts to AGPL-3.0 on 2030-06-22. See [LICENSE](./LICENSE). Built by [RedDB.io](https://github.com/reddb-io)
641
+ <div align="center">
642
+
643
+ **Business Source License 1.1** โ€” source-available; free for self-hosted & internal use. Managed services require a commercial license. Converts to AGPL-3.0 on June 22, 2030. See [LICENSE](./LICENSE).
644
+
645
+ Built by [RedDB.io](https://github.com/reddb-io)
646
+
647
+ </div>
638
648
 
639
649
  <!-- contract-matrix:begin -->
640
650
  ## Public-surface support
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reddb-io/sdk",
3
- "version": "1.21.0-rc.193",
3
+ "version": "1.21.0-rc.195",
4
4
  "description": "Official embedded RedDB SDK โ€” launches a local red binary over stdio JSON-RPC. Use @reddb-io/client for remote HTTP, gRPC, and RedWire.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -57,7 +57,7 @@ export class DocumentClient {
57
57
  .map(([field, value]) => `${sqlIdentifier(field)} = ${sqlValueLiteral(value)}`)
58
58
  .join(', ')
59
59
  const result = await this.db.query(
60
- `UPDATE ${sqlIdentifierPath(collection)} DOCUMENTS SET ${assignments} WHERE rid = $1 RETURNING *`,
60
+ `UPDATE ${sqlIdentifierPath(collection)} SET ${assignments} WHERE rid = $1 RETURNING *`,
61
61
  rid,
62
62
  )
63
63
  const item = result.rows?.[0]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reddb-io/cli",
3
- "version": "1.21.0-rc.193",
3
+ "version": "1.21.0-rc.195",
4
4
  "description": "CLI launcher for RedDB. The JS/TS app driver is published as @reddb-io/sdk.",
5
5
  "type": "commonjs",
6
6
  "bin": {