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

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,79 +1,74 @@
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.
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>
8
5
  </p>
9
6
 
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">
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>
15
11
  </p>
16
12
 
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
-
25
13
  > [!IMPORTANT]
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.
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.
27
19
 
28
20
  ---
29
21
 
30
- ## โœจ The Killer Feature: `ASK`
22
+ ## The Killer Feature: `ASK`
31
23
 
32
24
  ```sql
33
25
  ASK 'who owns passport AB1234567 and what services do they use?'
34
26
  ```
35
27
 
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.
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.
37
29
 
38
30
  ---
39
31
 
40
- ## ๐Ÿ“Š 7 Data Models, 1 Engine
32
+ ## 7 Data Models, 1 Engine
41
33
 
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.
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.
43
38
 
44
39
  ```sql
45
- -- ๐Ÿ“‹ Relational rows
40
+ -- Relational rows
46
41
  INSERT INTO users (name, email) VALUES ('Alice', 'alice@co.com')
47
42
 
48
- -- ๐Ÿ“„ JSON documents โ€” inline JSON syntax
49
- INSERT INTO logs DOCUMENT VALUES ({"level": "info", "msg": "login"})
43
+ -- JSON documents
44
+ INSERT INTO logs DOCUMENT VALUES ({"level":"info","msg":"login"})
50
45
 
51
- -- ๐Ÿ”— Graph edges
46
+ -- Graph edges
52
47
  INSERT INTO network EDGE (label, from_rid, to_rid) VALUES ('CONNECTS', 102, 103)
53
48
 
54
- -- ๐ŸŽฏ Vector similarity search
49
+ -- Vector similarity search
55
50
  SEARCH SIMILAR TEXT 'anomaly detected' COLLECTION events
56
51
 
57
- -- ๐Ÿ”‘ Key-value
52
+ -- Key-value
58
53
  KV PUT config.theme = 'dark'
59
54
 
60
- -- โฑ๏ธ Time-series (retention & downsampling)
55
+ -- Time-series metrics (with retention & downsampling)
61
56
  CREATE TIMESERIES cpu_metrics RETENTION 90 d
62
- INSERT INTO cpu_metrics (metric, value, tags) VALUES ('cpu.idle', 95.2, {"host": "srv1"})
57
+ INSERT INTO cpu_metrics (metric, value, tags) VALUES ('cpu.idle', 95.2, {"host":"srv1"})
63
58
 
64
- -- ๐Ÿ“ฆ Hypertables (logs, events, telemetry)
59
+ -- Hypertables + partition TTL + continuous aggregates (logs / events / telemetry)
65
60
  CREATE HYPERTABLE access_log TIME_COLUMN ts CHUNK_INTERVAL '1d' TTL '90d'
66
61
 
67
- -- ๐Ÿ“‘ Append-only (audit, ledger, immutable)
62
+ -- Append-only tables (audit, ledger, immutable events)
68
63
  CREATE TABLE audit_log (id BIGINT, action TEXT) APPEND ONLY
69
64
 
70
- -- ๐Ÿ“จ Message queues (FIFO, priority, consumer groups)
65
+ -- Message queues (FIFO, priority, consumer groups)
71
66
  CREATE QUEUE tasks MAX_SIZE 10000
72
- QUEUE PUSH tasks {"job": "process", "id": 123}
67
+ QUEUE PUSH tasks {"job":"process","id":123}
73
68
  QUEUE POP tasks
74
69
  ```
75
70
 
76
- Same file. Same engine. Same query language โ€” everything lives in one `.rdb` file.
71
+ Same file. Same engine. Same query language.
77
72
 
78
73
  Want to use RedDB as your log store? Start with the
79
74
  [Logs Quickstart](./docs/guides/logs-quickstart.md) or the full
@@ -81,46 +76,44 @@ Want to use RedDB as your log store? Start with the
81
76
 
82
77
  ---
83
78
 
84
- ## ๐Ÿง  AI-Native From Day One
79
+ ## AI-Native From Day One
85
80
 
86
81
  ```sql
87
82
  -- Semantic search without managing vectors yourself
88
83
  SEARCH SIMILAR TEXT 'suspicious login' COLLECTION logs USING groq
89
84
 
90
- -- Auto-embed on insert โ€” vectors are created automatically
85
+ -- Auto-embed on insert -- vectors are created for you
91
86
  INSERT INTO articles (title, body) VALUES ('AI Safety', 'Alignment research...')
92
87
  WITH AUTO EMBED (body) USING openai
93
88
 
94
- -- Context search across all data models
89
+ -- Context search: find everything related to an entity across all models
95
90
  SEARCH CONTEXT '192.168.1.1' FIELD ip DEPTH 2
96
91
 
97
- -- Ask questions in plain English, get grounded answers
92
+ -- Ask questions in plain English
98
93
  ASK 'what vulnerabilities affect host 10.0.0.1?' USING anthropic
99
94
  ```
100
95
 
101
- RAG built into the database layer. RedDB retrieves context from every data model and feeds it to the LLM.
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.
102
97
 
103
98
  ---
104
99
 
105
- ## ๐Ÿค– 11 AI Providers
106
-
107
- Swap providers with a keyword. No code changes. Full parity across ASK, embeddings, and model selection.
100
+ ## 11 AI Providers
108
101
 
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 | โœ… | โœ… |
102
+ Swap providers with a keyword. No code changes.
122
103
 
123
- *Anthropic does not offer embeddings; RedDB rejects embedding calls explicitly rather than re-routing to another provider.
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 | โœ… | โœ… |
124
117
 
125
118
  Most providers speak the OpenAI-compatible `POST /embeddings` shape;
126
119
  HuggingFace has its own (`POST /pipeline/feature-extraction/{model}`)
@@ -159,12 +152,12 @@ curl http://127.0.0.1:5000/config
159
152
 
160
153
  ---
161
154
 
162
- ## ๐ŸŽฒ Probabilistic Data Structures
155
+ ## Probabilistic Data Structures
163
156
 
164
- Built-in approximate data structures for real-time analytics at scale. Cardinality estimation, frequency analysis, and set membership all in one engine.
157
+ Built-in approximate data structures for real-time analytics at scale.
165
158
 
166
159
  ```sql
167
- -- HyperLogLog: unique visitor count (~0.8% error, 16KB memory)
160
+ -- HyperLogLog: count unique visitors (~0.8% error, ~16KB memory)
168
161
  CREATE HLL visitors
169
162
  HLL ADD visitors 'user1' 'user2' 'user3'
170
163
  HLL COUNT visitors
@@ -174,7 +167,7 @@ CREATE SKETCH click_counter WIDTH 2000 DEPTH 7
174
167
  SKETCH ADD click_counter 'button_a' 5
175
168
  SKETCH COUNT click_counter 'button_a'
176
169
 
177
- -- Cuckoo Filter: membership + deletion (unlike Bloom)
170
+ -- Cuckoo Filter: membership testing with deletion (unlike Bloom filters)
178
171
  CREATE FILTER active_sessions CAPACITY 500000
179
172
  FILTER ADD active_sessions 'session_abc'
180
173
  FILTER CHECK active_sessions 'session_abc'
@@ -183,18 +176,18 @@ FILTER DELETE active_sessions 'session_abc'
183
176
 
184
177
  ---
185
178
 
186
- ## ๐Ÿ—‚๏ธ Advanced Indexes
179
+ ## Advanced Indexes
187
180
 
188
- Beyond B-tree. Pick the right index for your access pattern.
181
+ Beyond B-tree. Create the right index for your workload.
189
182
 
190
183
  ```sql
191
- -- Hash: O(1) exact-match lookups
184
+ -- Hash index: O(1) exact-match lookups
192
185
  CREATE INDEX idx_email ON users (email) USING HASH
193
186
 
194
- -- Bitmap: analytical queries on low-cardinality columns
187
+ -- Bitmap index: fast analytical queries on low-cardinality columns
195
188
  CREATE INDEX idx_status ON orders (status) USING BITMAP
196
189
 
197
- -- R-Tree: spatial & geographic queries
190
+ -- R-Tree: spatial queries on geo data
198
191
  CREATE INDEX idx_loc ON sites (location) USING RTREE
199
192
  SEARCH SPATIAL RADIUS 48.8566 2.3522 10.0 COLLECTION sites COLUMN location LIMIT 50
200
193
  SEARCH SPATIAL NEAREST 48.8566 2.3522 K 5 COLLECTION sites COLUMN location
@@ -202,7 +195,7 @@ SEARCH SPATIAL NEAREST 48.8566 2.3522 K 5 COLLECTION sites COLUMN location
202
195
 
203
196
  ---
204
197
 
205
- ## ๐Ÿ”ง SQL Extensions
198
+ ## SQL Extensions
206
199
 
207
200
  RedDB extends SQL with `WITH` clauses for operational semantics:
208
201
 
@@ -225,7 +218,7 @@ INSERT INTO events (name) VALUES ('launch') WITH EXPIRES AT 1735689600000
225
218
 
226
219
  ---
227
220
 
228
- ## ๐Ÿ”ค 6 Query Languages
221
+ ## 6 Query Languages
229
222
 
230
223
  Write in whatever you think in. The engine auto-detects the language.
231
224
 
@@ -242,9 +235,9 @@ All six hit the same engine, same data, same indexes.
242
235
 
243
236
  ---
244
237
 
245
- ## ๐Ÿ”„ Native Migrations โ€” No External Tools
238
+ ## Native Migrations โ€” No External Tools
246
239
 
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.
240
+ Stop reaching for Flyway, Liquibase, Drizzle Migrate, or Sequelize migrations. RedDB handles schema and data migrations as first-class SQL commands.
248
241
 
249
242
  ```sql
250
243
  -- Register a migration
@@ -275,26 +268,26 @@ Every applied migration creates a **VCS commit** (RedDB's "Git for Data"). Rollb
275
268
 
276
269
  ---
277
270
 
278
- ## ๐Ÿ“ฆ 48 Built-in Types
271
+ ## 48 Built-in Types
272
+
273
+ Not just `TEXT` and `INTEGER`. RedDB understands your domain.
279
274
 
280
- Not just `TEXT` and `INTEGER`. RedDB understands your domain โ€” validation on write, no parsing in your app.
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`
281
283
 
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` |
284
+ Validation on write. No parsing in your app.
292
285
 
293
286
  ---
294
287
 
295
- ## ๐Ÿ’พ Backup & Recovery
288
+ ## Backup & Recovery
296
289
 
297
- Built-in backup scheduler, WAL archiving, CDC, and Point-in-Time Recovery โ€” no sidecars required:
290
+ Built-in backup scheduler, WAL archiving, Change Data Capture (CDC), and Point-in-Time Recovery framework:
298
291
 
299
292
  ```bash
300
293
  # Poll real-time changes
@@ -315,7 +308,7 @@ PITR rollback, replica promotion), see
315
308
 
316
309
  ---
317
310
 
318
- ## ๐Ÿ”Œ KV REST API
311
+ ## KV REST API
319
312
 
320
313
  Every collection doubles as a key-value store with dedicated REST endpoints:
321
314
 
@@ -348,26 +341,32 @@ SHOW CONFIG red.ai
348
341
 
349
342
  ---
350
343
 
351
- ## ๐ŸŒ 3 Deployment Modes
344
+ ## 3 Deployment Modes
352
345
 
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 |
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 |
358
351
 
359
- Same storage format. Start embedded, scale to server, expose to agents โ€” zero migration.
352
+ Same storage format across all three. Start embedded, scale to server, expose to agents -- no migration.
360
353
 
361
354
  ---
362
355
 
363
- ## โšก Performance
356
+ ## Performance
364
357
 
365
- > **Where RedDB wins:** benchmarks show measurable wins over Postgres and Mongo today:
358
+ > **Where RedDB wins.** Two scenarios in the canonical `duel-official`
359
+ > benchmark show measurable wins over Postgres and Mongo today:
366
360
  >
367
- > - `typed_insert` โ€” **16ร— faster** than PostgreSQL on typed single-row inserts
368
- > - `disk_usage` โ€” **1.5ร— faster** than MongoDB on compact-write workloads
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.
369
365
  >
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.
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).
371
370
 
372
371
  RedDB uses multiple optimization techniques for fast queries at scale:
373
372
 
@@ -387,23 +386,25 @@ RedDB uses multiple optimization techniques for fast queries at scale:
387
386
 
388
387
  ---
389
388
 
390
- ## ๐Ÿ›ก๏ธ Durability & Corruption Defense
389
+ ## Durability & Corruption Defense
391
390
 
392
- Seven layers of protection โ€” tested and proven against power loss, torn writes, and crashes:
391
+ RedDB uses 7 layers of protection to keep your data safe:
393
392
 
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 |
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.
403
404
 
404
405
  ---
405
406
 
406
- ## ๐Ÿ”€ Eventual Consistency
407
+ ## Eventual Consistency
407
408
 
408
409
  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.
409
410
 
@@ -428,7 +429,7 @@ See the [Eventual Consistency Guide](https://reddb-io.github.io/reddb/#/guides/e
428
429
 
429
430
  ---
430
431
 
431
- ## ๐Ÿ—บ๏ธ Geographic Operations
432
+ ## Geographic Operations
432
433
 
433
434
  Built-in geo functions with no external dependencies. Supports both spherical (Haversine) and ellipsoidal (Vincenty/WGS-84) models.
434
435
 
@@ -461,7 +462,7 @@ Also available: destination point, bounding box, polygon area, spatial search (R
461
462
 
462
463
  ---
463
464
 
464
- ## ๐Ÿ“ˆ Vector Clustering
465
+ ## Vector Clustering
465
466
 
466
467
  Standalone K-Means and DBSCAN clustering on vector collections, with SIMD-accelerated distance computation and automatic parallelization.
467
468
 
@@ -481,9 +482,11 @@ K-Means uses parallel assignment (multi-threaded for datasets > 1K vectors). DBS
481
482
 
482
483
  ---
483
484
 
484
- ## ๐Ÿš€ Native Drivers
485
+ ## Native Drivers
485
486
 
486
- One connection-string API, multiple languages. Same `connect(uri)` everywhere โ€” code ports across runtimes with zero ceremony.
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.
487
490
 
488
491
  | Language | Package | Install | Backends |
489
492
  |-------------------|------------------|--------------------------------|-------------------------------------|
@@ -564,87 +567,74 @@ npx @reddb-io/cli@latest server --wire-bind 127.0.0.1:5050 --http-bind 127.0.0.1
564
567
 
565
568
  ---
566
569
 
567
- ## ๐Ÿš€ Quick Start
568
-
569
- **Install the `red` binary:**
570
+ ## Quick Start
570
571
 
571
572
  ```bash
573
+ # Install
572
574
  curl -fsSL https://raw.githubusercontent.com/reddb-io/reddb/main/install.sh | bash
573
- # Verifies SHA256 before install โ€ข auto-detects your OS + arch
574
- ```
575
+ # The installer verifies the selected release asset against SHA256SUMS before install.
575
576
 
576
- **Start the server:**
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
577
579
 
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
580
+ # Insert data
586
581
  curl -X POST http://127.0.0.1:5000/query \
587
582
  -H 'content-type: application/json' \
588
- -d '{"query":"INSERT INTO hosts (ip, os) VALUES ('"'"'10.0.0.1'"'"', '"'"'linux'"'"')"}'
583
+ -d '{"query":"INSERT INTO hosts (ip, os) VALUES ('\''10.0.0.1'\'', '\''linux'\'')"}'
589
584
 
585
+ # Query it
590
586
  curl -X POST http://127.0.0.1:5000/query \
591
587
  -H 'content-type: application/json' \
592
588
  -d '{"query":"SELECT * FROM hosts"}'
593
589
  ```
594
590
 
595
- **Or via npm (no separate install):**
591
+ Or via npm CLI launcher:
596
592
 
597
593
  ```bash
598
- npx @reddb-io/cli@latest server --http-bind 127.0.0.1:5000
594
+ npx @reddb-io/cli@latest server --wire-bind 127.0.0.1:5050 --http-bind 127.0.0.1:5000
599
595
  ```
600
596
 
601
- **Or Docker:**
597
+ Or via Docker:
602
598
 
603
599
  ```bash
604
- docker run --rm -p 5050:5050 -p 55055:55055 -p 5000:5000 \
605
- ghcr.io/reddb-io/reddb:latest
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
606
602
  ```
607
603
 
608
- โ†’ See [`docs/deployment/docker.md`](./docs/deployment/docker.md) and [`docs/security/vault.md`](./docs/security/vault.md) for production setups.
609
-
610
- ---
604
+ Or, if you only need the thin remote-only client (~7 MB image):
611
605
 
612
- ## ๐Ÿ“‚ Architecture
613
-
614
- RedDB ships as a Cargo workspace:
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
+ ```
615
610
 
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 |
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).
624
614
 
625
615
  ---
626
616
 
627
- ## ๐Ÿ“š Resources
617
+ ## Workspace layout
628
618
 
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 |
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.
638
622
 
639
- ---
640
-
641
- <div align="center">
623
+ ## Links
642
624
 
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).
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
644
634
 
645
- Built by [RedDB.io](https://github.com/reddb-io)
635
+ ---
646
636
 
647
- </div>
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)
648
638
 
649
639
  <!-- contract-matrix:begin -->
650
640
  ## Public-surface support
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reddb-io/sdk",
3
- "version": "1.21.0-rc.195",
3
+ "version": "1.21.0",
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)} SET ${assignments} WHERE rid = $1 RETURNING *`,
60
+ `UPDATE ${sqlIdentifierPath(collection)} DOCUMENTS 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.195",
3
+ "version": "1.21.0",
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": {