spindb 0.19.2 → 0.19.3

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
@@ -3,1200 +3,821 @@
3
3
  [![npm version](https://img.shields.io/npm/v/spindb.svg)](https://www.npmjs.com/package/spindb)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/spindb.svg)](https://www.npmjs.com/package/spindb)
5
5
  [![License: PolyForm Noncommercial](https://img.shields.io/badge/License-PolyForm%20Noncommercial-blue.svg)](LICENSE)
6
- [![Platform: macOS | Linux | Windows](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey.svg)](#platform-support-vs-alternatives)
6
+ [![Platform: macOS | Linux | Windows](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey.svg)](#platform-coverage)
7
7
 
8
- **The first npm CLI for running local databases without Docker.**
8
+ **One CLI for all your local databases.**
9
9
 
10
- Spin up PostgreSQL, MySQL, MariaDB, SQLite, DuckDB, MongoDB, Redis, Valkey, and ClickHouse instances for local development. No Docker daemon, no container networking, no volume mounts. Just databases running on localhost, ready in seconds.
11
-
12
- ---
13
-
14
- ## Quick Start
10
+ SpinDB is a universal database management tool that combines a package manager, a unified API, and native client tooling for 9 different database engines—all from a single command-line interface. No Docker, no VMs, no platform-specific installers. Just databases, running natively on your machine.
15
11
 
16
12
  ```bash
17
- # Install globally (or use pnpm/yarn)
18
13
  npm install -g spindb
19
14
 
20
- # Create and start a PostgreSQL database
21
- spindb create myapp
15
+ # PostgreSQL for your API
16
+ spindb create api-db
22
17
 
23
- # Connect to it
24
- spindb connect myapp
25
-
26
- # You're in! Run some SQL:
27
- # postgres=# CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT);
28
- ```
29
-
30
- That's it. Your database is running on `localhost:5432`, and your data persists in `~/.spindb/containers/postgresql/myapp/`.
31
-
32
- ---
33
-
34
- ## Why SpinDB?
35
-
36
- Docker is great for production parity and complex multi-service setups. But for local development databases, it's often overkill:
37
-
38
- - **Resource overhead** - Docker Desktop runs a Linux VM on macOS/Windows
39
- - **Complexity** - Volumes, networks, compose files for a single database
40
- - **Startup time** - Container initialization vs native process launch
41
- - **Licensing** - Docker Desktop requires a paid subscription for larger organizations
42
-
43
- Sometimes you just want PostgreSQL on `localhost:5432` without the ceremony.
44
-
45
- SpinDB runs databases as native processes with isolated data directories. No VM, no daemon, no container networking. Just databases.
46
-
47
- ### SpinDB vs Alternatives
48
-
49
- | Feature | SpinDB | Docker | DBngin | Postgres.app | XAMPP |
50
- |---------|--------|--------|--------|--------------|-------|
51
- | No Docker required | ✅ | ❌ | ✅ | ✅ | ✅ |
52
- | Multiple DB engines | ✅ | ✅ | ✅ | ❌ | ⚠️ MySQL only |
53
- | CLI-first | ✅ | ✅ | ❌ | ❌ | ❌ |
54
- | Multiple versions | ✅ | ✅ | ✅ | ✅ | ❌ |
55
- | Clone databases | ✅ | Manual | ✅ | ❌ | ❌ |
56
- | Low resource usage | ✅ | ❌ | ✅ | ✅ | ✅ |
57
- | Linux support | ✅ | ✅ | ❌ | ❌ | ✅ |
58
- | Free | ✅ | ⚠️ | ✅ | ✅ | ✅ |
18
+ # MongoDB for analytics
19
+ spindb create analytics --engine mongodb
59
20
 
60
- ### Platform Support vs Alternatives
21
+ # Redis for caching
22
+ spindb create cache --engine redis
61
23
 
62
- | Platform | SpinDB | Docker | DBngin | Postgres.app | XAMPP |
63
- |----------|--------|--------|--------|--------------|-------|
64
- | macOS (ARM64) | ✅ | ✅ | ✅ | ✅ | ✅ |
65
- | macOS (Intel) | ✅ | ✅ | ✅ | ✅ | ✅ |
66
- | Linux (x64) | ✅ | ✅ | ❌ | ❌ | ✅ |
67
- | Linux (ARM64) | ✅ | ✅ | ❌ | ❌ | ❌ |
68
- | Windows (x64) | ✅ | ✅ | ❌ | ❌ | ✅ |
24
+ # All running side-by-side, all managed the same way
25
+ ```
69
26
 
70
27
  ---
71
28
 
72
- ## Installation
29
+ ## What is SpinDB?
73
30
 
74
- SpinDB is distributed via npm. A global install is recommended so you can run `spindb` from anywhere.
31
+ SpinDB is **three tools in one**:
75
32
 
76
- We recommend [pnpm](https://pnpm.io/) as a faster, more disk-efficient alternative to npm.
33
+ ### 1. **Database Package Manager**
34
+ Download and manage multiple database engines and versions—just like `apt`, `brew`, or `npm`, but for databases.
77
35
 
78
36
  ```bash
79
- # Using pnpm (recommended)
80
- pnpm add -g spindb
37
+ # Run PostgreSQL 14 for legacy projects, 18 for new ones
38
+ spindb create old-project --engine postgresql --db-version 14
39
+ spindb create new-project --engine postgresql --db-version 18
81
40
 
82
- # Using npm
83
- npm install -g spindb
84
-
85
- # Or run directly without installing
86
- pnpx spindb
87
- npx spindb
41
+ # Or MySQL 8.0 alongside MySQL 9
42
+ spindb create legacy-mysql --engine mysql --db-version 8.0
43
+ spindb create modern-mysql --engine mysql --db-version 9
88
44
  ```
89
45
 
90
- ### Updating
91
-
92
- SpinDB checks for updates automatically and notifies you when a new version is available.
46
+ ### 2. **Unified Database API**
47
+ One consistent interface across SQL databases, document stores, key-value stores, and analytics engines.
93
48
 
94
49
  ```bash
95
- # Update to latest version
96
- spindb self-update
97
-
98
- # Or check manually
99
- spindb version --check
100
-
101
- # Disable automatic update checks
102
- spindb config update-check off
50
+ # Same commands work for ANY database
51
+ spindb create mydb --engine [postgresql|mysql|mariadb|mongodb|redis|valkey|clickhouse|sqlite|duckdb]
52
+ spindb start mydb
53
+ spindb connect mydb
54
+ spindb backup mydb
55
+ spindb restore mydb backup.dump
103
56
  ```
104
57
 
105
- ---
106
-
107
- ## The Interactive Menu
108
-
109
- Most of the time, you don't need to remember commands. Just run:
58
+ ### 3. **Native Database Client**
59
+ Access built-in shells, run queries, and execute scripts—all without installing separate clients.
110
60
 
111
61
  ```bash
112
- spindb
62
+ # Execute SQL/NoSQL/commands across any engine
63
+ spindb run mydb script.sql # PostgreSQL/MySQL/SQLite
64
+ spindb run mydb -c "db.users.find().pretty()" # MongoDB
65
+ spindb run mydb -c "SET mykey myvalue" # Redis/Valkey
66
+ spindb run mydb -c "SELECT * FROM system.tables" # ClickHouse
113
67
  ```
114
68
 
115
- You'll get an interactive menu with arrow-key navigation:
116
-
117
- ```
118
- ? What would you like to do?
119
- ❯ Create a new container
120
- Manage containers
121
- View installed engines
122
- Check dependencies
123
- Settings
124
- Exit
125
- ```
126
-
127
- **Everything in the menu is also available as a CLI command.** The menu is just a friendlier interface for the same operations. If you prefer typing commands or scripting, SpinDB has full CLI support.
128
-
129
69
  ---
130
70
 
131
- ## Database Engines
132
-
133
- ### Supported Engines
134
-
135
- #### PostgreSQL
71
+ ## Platform Coverage
136
72
 
137
- | | |
138
- |---|---|
139
- | Versions | 15, 16, 17, 18 |
140
- | Default port | 5432 |
141
- | Default user | `postgres` |
142
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) (macOS/Linux), [EDB](https://www.enterprisedb.com/) (Windows) |
73
+ SpinDB works across **9 database engines** and **5 platform architectures** with a **single, consistent API**.
143
74
 
144
- SpinDB downloads PostgreSQL server binaries automatically:
145
- - **macOS/Linux:** Pre-compiled binaries from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases
146
- - **Windows:** Official binaries from EnterpriseDB (EDB)
147
-
148
- **Why download binaries instead of using system PostgreSQL?** The hostdb project provides pre-configured, portable PostgreSQL binaries—just extract and run. This lets you run PostgreSQL 14 for one project and 18 for another, side-by-side, without conflicts.
149
-
150
- **Client tools included:** PostgreSQL binaries include `psql`, `pg_dump`, and `pg_restore` for all operations.
75
+ | Database | macOS ARM64 | macOS Intel | Linux x64 | Linux ARM64 | Windows x64 |
76
+ |----------|:-----------:|:-----------:|:---------:|:-----------:|:-----------:|
77
+ | 🐘 **PostgreSQL** | | | ✅ | ✅ | ✅ |
78
+ | 🐬 **MySQL** | ✅ | ✅ | ✅ | ✅ | ✅ |
79
+ | 🦭 **MariaDB** | | | | | |
80
+ | 🪶 **SQLite** | ✅ | ✅ | ✅ | ✅ | ✅ |
81
+ | 🦆 **DuckDB** | | | | | |
82
+ | 🍃 **MongoDB** | ✅ | ✅ | ✅ | ✅ | ✅ |
83
+ | 🔴 **Redis** | ✅ | ✅ | ✅ | ✅ | ✅ |
84
+ | 🔷 **Valkey** | ✅ | ✅ | ✅ | ✅ | ✅ |
85
+ | 🏠 **ClickHouse** | ✅ | ✅ | ✅ | ✅ | ❌ |
86
+
87
+ **44 combinations. One CLI. Zero configuration.**
151
88
 
152
- #### MariaDB
89
+ ---
153
90
 
154
- | | |
155
- |---|---|
156
- | Versions | 10.11, 11.4, 11.8 |
157
- | Default port | 3307 |
158
- | Default user | `root` |
159
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
91
+ ## Quick Start
160
92
 
161
- SpinDB downloads MariaDB server binaries automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases—just like PostgreSQL. This provides multi-version support and works across all platforms.
93
+ Install SpinDB globally using your preferred package manager:
162
94
 
163
95
  ```bash
164
- # Create a MariaDB container
165
- spindb create mydb --engine mariadb
96
+ # Using npm
97
+ npm install -g spindb
166
98
 
167
- # Or using the alias
168
- spindb create mydb -e maria
99
+ # Using pnpm (recommended - faster, more efficient)
100
+ pnpm add -g spindb
169
101
 
170
- # Check what's available
171
- spindb deps check --engine mariadb
102
+ # Or run without installing
103
+ npx spindb
172
104
  ```
173
105
 
174
- MariaDB is MySQL-compatible, so most MySQL tools and clients work seamlessly. If you need MySQL-specific features, use the `mysql` engine instead.
175
-
176
- #### MySQL
177
-
178
- | | |
179
- |---|---|
180
- | Versions | 8.0, 8.4, 9 |
181
- | Default port | 3306 |
182
- | Default user | `root` |
183
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
184
-
185
- SpinDB downloads MySQL server binaries automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases—just like PostgreSQL and MariaDB. This provides multi-version support and works across all platforms.
106
+ Create and start a database in seconds:
186
107
 
187
108
  ```bash
188
- # Create a MySQL container
189
- spindb create mydb --engine mysql
190
-
191
- # Create with specific version
192
- spindb create mydb --engine mysql --version 8.0
109
+ # PostgreSQL (default engine)
110
+ spindb create myapp
111
+ spindb start myapp
112
+ spindb connect myapp
193
113
 
194
- # Check what's available
195
- spindb deps check --engine mysql
114
+ # Or all in one command
115
+ spindb create myapp --start --connect
196
116
  ```
197
117
 
198
- **Client tools included:** MySQL binaries include `mysql`, `mysqldump`, and `mysqladmin` for all operations. No system installation required.
199
-
200
- #### SQLite
201
-
202
- | | |
203
- |---|---|
204
- | Version | 3 |
205
- | Default port | N/A (file-based) |
206
- | Data location | Project directory (CWD) |
207
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
118
+ That's it! Your PostgreSQL database is now running on `localhost:5432`, and data persists in `~/.spindb/containers/postgresql/myapp/`.
208
119
 
209
- SQLite is a file-based database—no server process, no ports. Databases are stored in your project directory by default, not `~/.spindb/`. SpinDB tracks registered SQLite databases in a registry file.
210
-
211
- **Tools included:** SQLite binaries include `sqlite3`, `sqldiff`, `sqlite3_analyzer`, and `sqlite3_rsync`. No system installation required.
120
+ ### Try Other Engines
212
121
 
213
122
  ```bash
214
- # Create in current directory
215
- spindb create mydb --engine sqlite
123
+ # MySQL for relational data
124
+ spindb create shop --engine mysql --start --connect
216
125
 
217
- # Create with custom path
218
- spindb create mydb --engine sqlite --path ./data/mydb.sqlite
126
+ # MongoDB for document storage
127
+ spindb create logs --engine mongodb --start
219
128
 
220
- # Connect to it
221
- spindb connect mydb
129
+ # Redis for caching and real-time features
130
+ spindb create sessions --engine redis --start
222
131
 
223
- # Use litecli for enhanced experience
224
- spindb connect mydb --litecli
132
+ # DuckDB for analytics
133
+ spindb create analytics --engine duckdb --start
225
134
  ```
226
135
 
227
- **Note:** Unlike server databases, SQLite databases don't need to be "started" or "stopped"—they're always available as long as the file exists.
228
-
229
- #### DuckDB
230
-
231
- | | |
232
- |---|---|
233
- | Version | 1 |
234
- | Default port | N/A (file-based) |
235
- | Data location | Project directory (CWD) |
236
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
237
-
238
- DuckDB is an embedded analytical database—file-based like SQLite, but optimized for OLAP workloads and analytics. No server process, no ports. Databases are stored in your project directory by default, not `~/.spindb/`. SpinDB tracks registered DuckDB databases in a registry file.
239
-
240
- **Tools included:** DuckDB binary `duckdb` for all operations. No system installation required.
241
-
242
- ```bash
243
- # Create in current directory
244
- spindb create mydb --engine duckdb
245
-
246
- # Create with custom path
247
- spindb create mydb --engine duckdb --path ./data/analytics.duckdb
248
-
249
- # Connect to it
250
- spindb connect mydb
251
- ```
136
+ Every engine works the same way. Learn one, use them all.
252
137
 
253
- **Note:** Unlike server databases, DuckDB databases don't need to be "started" or "stopped"—they're always available as long as the file exists.
138
+ ---
254
139
 
255
- #### MongoDB
140
+ ## Why SpinDB?
256
141
 
257
- | | |
258
- |---|---|
259
- | Versions | 7.0, 8.0, 8.2 |
260
- | Default port | 27017 |
261
- | Default user | None (no auth by default) |
262
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
142
+ ### The Problem with Current Tools
263
143
 
264
- SpinDB downloads MongoDB server binaries automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases—just like PostgreSQL, MariaDB, and MySQL. This provides multi-version support on all platforms.
144
+ **Docker** is powerful but heavy—requires a daemon, runs containers in a VM (on macOS/Windows), and adds complexity for simple local databases.
265
145
 
266
- ```bash
267
- # Create a MongoDB container (downloads binaries automatically)
268
- spindb create mydb --engine mongodb
146
+ **GUI tools** like DBngin and Postgres.app are great but platform-specific, don't support scripting, and lack a unified interface across engines.
269
147
 
270
- # Create with specific version
271
- spindb create mydb --engine mongodb --version 8.0
148
+ **System package managers** (brew, apt, etc.) work but create version conflicts, require manual configuration, and don't provide consistent management across databases.
272
149
 
273
- # Check what's available
274
- spindb deps check --engine mongodb
275
- ```
150
+ ### SpinDB's Approach
276
151
 
277
- MongoDB uses JavaScript for queries instead of SQL. When using `spindb run`, pass JavaScript code:
152
+ SpinDB runs databases as **native processes** with **isolated data directories**:
278
153
 
279
- ```bash
280
- # Insert a document
281
- spindb run mydb -c "db.users.insertOne({name: 'Alice', email: 'alice@example.com'})"
154
+ - **No Docker daemon or VM overhead** - Direct process execution
155
+ - **No system installation conflicts** - Each database version lives in `~/.spindb/bin/`
156
+ - **No manual configuration** - Databases start with sensible defaults
157
+ - **Cross-platform consistency** - Same commands work on macOS, Linux, and Windows
158
+ - **Multi-version support** - Run PostgreSQL 14 and 18 side-by-side
159
+ - **Unified interface** - Manage PostgreSQL, MongoDB, and Redis the same way
282
160
 
283
- # Query documents
284
- spindb run mydb -c "db.users.find().pretty()"
161
+ ### Comparison Matrix
285
162
 
286
- # Run a JavaScript file
287
- spindb run mydb --file ./scripts/seed.js
288
- ```
163
+ | Feature | SpinDB | Docker | DBngin | Postgres.app | XAMPP |
164
+ |---------|--------|--------|--------|--------------|-------|
165
+ | No Docker required | ✅ | ❌ | ✅ | ✅ | ✅ |
166
+ | Multiple DB engines | ✅ 9 engines | ✅ Unlimited | ✅ 3 engines | ❌ PostgreSQL only | ⚠️ MySQL only |
167
+ | CLI-first | ✅ | ✅ | ❌ GUI-first | ❌ GUI-first | ❌ GUI-first |
168
+ | Multiple versions | ✅ | ✅ | ✅ | ✅ | ❌ |
169
+ | Clone databases | ✅ | Manual | ✅ | ❌ | ❌ |
170
+ | Backup/restore built-in | ✅ | Manual | ✅ | ❌ | ❌ |
171
+ | Low resource usage | ✅ Native | ❌ VM on macOS/Win | ✅ Native | ✅ Native | ✅ Native |
172
+ | Linux support | ✅ | ✅ | ❌ | ❌ | ✅ |
173
+ | ARM64 support | ✅ | ✅ | ✅ | ✅ | ❌ |
174
+ | Free for commercial use | ❌ | ⚠️ Paid for orgs | ✅ | ✅ | ✅ |
289
175
 
290
- #### Redis
176
+ ---
291
177
 
292
- | | |
293
- |---|---|
294
- | Versions | 7, 8 |
295
- | Default port | 6379 |
296
- | Default user | None (no auth by default) |
297
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
178
+ ## Supported Databases
298
179
 
299
- SpinDB downloads Redis server binaries automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases—just like PostgreSQL, MariaDB, MySQL, and MongoDB. This provides multi-version support on all platforms.
180
+ SpinDB supports **9 database engines** with **multiple versions** for each:
300
181
 
301
- ```bash
302
- # Create a Redis container (downloads binaries automatically)
303
- spindb create mydb --engine redis
182
+ | Engine | Type | Versions | Default Port | Query Language |
183
+ |--------|------|----------|--------------|----------------|
184
+ | 🐘 **PostgreSQL** | Relational (SQL) | 15, 16, 17, 18 | 5432 | SQL |
185
+ | 🐬 **MySQL** | Relational (SQL) | 8.0, 8.4, 9 | 3306 | SQL |
186
+ | 🦭 **MariaDB** | Relational (SQL) | 10.11, 11.4, 11.8 | 3307 | SQL |
187
+ | 🪶 **SQLite** | Embedded (SQL) | 3 | N/A (file-based) | SQL |
188
+ | 🦆 **DuckDB** | Embedded OLAP | 1.4.3 | N/A (file-based) | SQL |
189
+ | 🍃 **MongoDB** | Document Store | 7.0, 8.0, 8.2 | 27017 | JavaScript (mongosh) |
190
+ | 🔴 **Redis** | Key-Value Store | 7, 8 | 6379 | Redis commands |
191
+ | 🔷 **Valkey** | Key-Value Store | 8, 9 | 6379 | Redis commands |
192
+ | 🏠 **ClickHouse** | Columnar OLAP | 25.12 | 9000 (TCP), 8123 (HTTP) | SQL (ClickHouse dialect) |
304
193
 
305
- # Create with specific version
306
- spindb create mydb --engine redis --version 8
194
+ ### Engine Categories
307
195
 
308
- # Check what's available
309
- spindb deps check --engine redis
310
- ```
196
+ **Server-Based Databases** (PostgreSQL, MySQL, MariaDB, MongoDB, Redis, Valkey, ClickHouse):
197
+ - Start/stop server processes
198
+ - Bind to localhost ports
199
+ - Data stored in `~/.spindb/containers/{engine}/{name}/`
311
200
 
312
- Redis uses numbered databases (0-15) instead of named databases. When using `spindb run`, pass Redis commands:
201
+ **File-Based Databases** (SQLite, DuckDB):
202
+ - No server process required
203
+ - Data stored in your project directories
204
+ - Always "running" (embedded, no daemon)
313
205
 
314
- ```bash
315
- # Set a key
316
- spindb run myredis -c "SET mykey myvalue"
317
-
318
- # Get a key
319
- spindb run myredis -c "GET mykey"
206
+ ### Binary Sources
320
207
 
321
- # Run a Redis command file
322
- spindb run myredis --file ./scripts/seed.redis
208
+ All engines download pre-compiled binaries from [**hostdb**](https://github.com/robertjbass/hostdb), a repository of portable database binaries for all major platforms:
323
209
 
324
- # Use iredis for enhanced shell experience
325
- spindb connect myredis --iredis
326
- ```
210
+ - **PostgreSQL**: hostdb (macOS/Linux), [EnterpriseDB](https://www.enterprisedb.com/) (Windows)
211
+ - **All other engines**: hostdb (all supported platforms)
327
212
 
328
- **Note:** Redis doesn't support remote dump/restore. Creating containers from remote Redis connection strings is not supported. Use `backup` and `restore` commands for data migration.
213
+ This enables **multi-version support** without system package conflicts. Run PostgreSQL 14 for legacy projects and 18 for new ones—simultaneously.
329
214
 
330
- #### Valkey
215
+ ---
331
216
 
332
- | | |
333
- |---|---|
334
- | Versions | 8, 9 |
335
- | Default port | 6379 |
336
- | Default user | None (no auth by default) |
337
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
217
+ ## Core Commands
338
218
 
339
- Valkey is a Redis fork created after Redis changed its license (RSALv2/SSPLv1). It's fully API-compatible with Redis, making it a drop-in replacement with permissive BSD-3 licensing.
219
+ SpinDB provides a comprehensive CLI with commands for every database lifecycle operation.
340
220
 
341
- SpinDB downloads Valkey server binaries automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases. This provides multi-version support on all platforms.
221
+ ### Container Lifecycle
342
222
 
343
223
  ```bash
344
- # Create a Valkey container (downloads binaries automatically)
345
- spindb create mydb --engine valkey
224
+ # Create a new database
225
+ spindb create mydb # PostgreSQL (default)
226
+ spindb create mydb --engine mongodb # MongoDB
227
+ spindb create mydb --engine mysql --db-version 8.0 # MySQL 8.0
228
+ spindb create mydb --port 5433 # Custom port
229
+ spindb create mydb --start --connect # Create, start, and connect
346
230
 
347
- # Create with specific version
348
- spindb create mydb --engine valkey --version 9
231
+ # Start/stop databases
232
+ spindb start mydb
233
+ spindb stop mydb
349
234
 
350
- # Check what's available
351
- spindb deps check --engine valkey
235
+ # Delete database (with confirmation)
236
+ spindb delete mydb
237
+ spindb delete mydb --yes --force # Skip prompts, force stop
352
238
  ```
353
239
 
354
- Valkey uses the same commands as Redis:
240
+ ### Data Operations
355
241
 
356
242
  ```bash
357
- # Set a key
358
- spindb run myvalkey -c "SET mykey myvalue"
243
+ # Connect to database shell
244
+ spindb connect mydb # Standard client (psql, mysql, etc.)
245
+ spindb connect mydb --pgcli # Enhanced PostgreSQL shell
246
+ spindb connect mydb --mycli # Enhanced MySQL shell
247
+ spindb connect mydb --tui # Universal SQL client (usql)
359
248
 
360
- # Get a key
361
- spindb run myvalkey -c "GET mykey"
249
+ # Execute queries and scripts
250
+ spindb run mydb script.sql # Run SQL file
251
+ spindb run mydb -c "SELECT * FROM users" # Inline SQL
252
+ spindb run mydb seed.js # JavaScript (MongoDB)
253
+ spindb run mydb -c "SET foo bar" # Redis command
362
254
 
363
- # Run a command file
364
- spindb run myvalkey --file ./scripts/seed.valkey
255
+ # Get connection string
256
+ spindb url mydb # postgresql://postgres@localhost:5432/mydb
257
+ spindb url mydb --copy # Copy to clipboard
258
+ spindb url mydb --json # JSON output with details
365
259
 
366
- # Use iredis for enhanced shell experience (Redis-protocol compatible)
367
- spindb connect myvalkey --iredis
260
+ # Use in scripts
261
+ export DATABASE_URL=$(spindb url mydb)
262
+ psql $(spindb url mydb)
368
263
  ```
369
264
 
370
- **Note:** Valkey uses `redis://` connection scheme for client compatibility since it's wire-compatible with Redis.
371
-
372
- #### ClickHouse
373
-
374
- | | |
375
- |---|---|
376
- | Versions | 25.12 |
377
- | Default port | 9000 (native TCP), 8123 (HTTP) |
378
- | Default user | `default` |
379
- | Binary source | [hostdb](https://github.com/robertjbass/hostdb) |
380
-
381
- ClickHouse is a column-oriented OLAP database designed for fast analytics on large datasets. SpinDB downloads ClickHouse server binaries automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases.
382
-
383
- **Note:** ClickHouse is only available on macOS and Linux. Windows is not supported.
265
+ ### Backup & Restore
384
266
 
385
267
  ```bash
386
- # Create a ClickHouse container (downloads binaries automatically)
387
- spindb create mydb --engine clickhouse
268
+ # Create backups
269
+ spindb backup mydb # Auto-generated filename
270
+ spindb backup mydb --name production-backup # Custom name
271
+ spindb backup mydb --output ./backups/ # Custom directory
272
+ spindb backup mydb --format sql # SQL text format
273
+ spindb backup mydb --format dump # Binary format
274
+
275
+ # Restore from backups
276
+ spindb restore mydb backup.dump
277
+ spindb restore mydb backup.sql --database prod_copy
388
278
 
389
- # Create with specific version
390
- spindb create mydb --engine clickhouse --version 25.12
279
+ # Pull from remote database
280
+ spindb restore mydb --from-url "postgresql://user:pass@prod-host/db"
391
281
 
392
- # Check what's available
393
- spindb deps check --engine clickhouse
282
+ # Clone existing database
283
+ spindb create prod-copy --from ./prod-backup.dump
284
+ spindb create staging --from "postgresql://user:pass@prod:5432/production"
394
285
  ```
395
286
 
396
- ClickHouse uses SQL (with ClickHouse-specific extensions):
287
+ ### Container Management
397
288
 
398
289
  ```bash
399
- # Create a table
400
- spindb run mych -c "CREATE TABLE users (id UInt64, name String) ENGINE = MergeTree() ORDER BY id"
290
+ # List all databases
291
+ spindb list
292
+ spindb list --json
401
293
 
402
- # Insert data
403
- spindb run mych -c "INSERT INTO users VALUES (1, 'Alice'), (2, 'Bob')"
294
+ # Show container details
295
+ spindb info mydb
296
+ spindb info mydb --json
297
+
298
+ # Clone a database
299
+ spindb clone source-db new-db
404
300
 
405
- # Query data
406
- spindb run mych -c "SELECT * FROM users"
301
+ # Edit configuration
302
+ spindb edit mydb --name newname # Rename
303
+ spindb edit mydb --port 5433 # Change port
304
+ spindb edit mydb --relocate ~/new/path # Move SQLite/DuckDB file
407
305
 
408
- # Run a SQL file
409
- spindb run mych --file ./scripts/seed.sql
306
+ # View logs
307
+ spindb logs mydb
308
+ spindb logs mydb --follow # Follow mode (tail -f)
309
+ spindb logs mydb -n 100 # Last 100 lines
410
310
  ```
411
311
 
412
- ### hostdb Platform Coverage
312
+ ### Engine & System Management
413
313
 
414
- SpinDB downloads database binaries from [hostdb](https://github.com/robertjbass/hostdb), a repository of pre-built database binaries for all major platforms. The following table shows current platform support and integration status:
314
+ ```bash
315
+ # Manage installed engines
316
+ spindb engines # List installed engines
317
+ spindb engines supported # Show all supported engines
318
+ spindb engines delete postgresql 16 # Remove specific version
415
319
 
416
- | Icon | Meaning |
417
- |:----:|---------|
418
- | | Integrated with SpinDB |
419
- | 🟦 | Pending SpinDB integration (hostdb ready) |
420
- | 🟪 | Planned for hostdb (pending/in-progress) |
320
+ # Manage client tools
321
+ spindb deps check # Check all dependencies
322
+ spindb deps check --engine postgresql # Check specific engine
323
+ spindb deps install # Install missing tools
421
324
 
422
- | Database | macOS ARM64 | macOS Intel | Linux x64 | Linux ARM64 | Windows x64 |
423
- |----------|:-----------:|:-----------:|:---------:|:-----------:|:-----------:|
424
- | **Integrated** |||||
425
- | PostgreSQL | | | ✅ | ✅ | ✅ |
426
- | MySQL | ✅ | ✅ | ✅ | ✅ | ✅ |
427
- | MariaDB | ✅ | ✅ | ✅ | ✅ | ✅ |
428
- | SQLite | ✅ | ✅ | ✅ | ✅ | ✅ |
429
- | DuckDB | ✅ | ✅ | ✅ | ✅ | ✅ |
430
- | MongoDB* | ✅ | ✅ | ✅ | ✅ | ✅ |
431
- | Redis* | ✅ | ✅ | ✅ | ✅ | ✅ |
432
- | Valkey | ✅ | ✅ | ✅ | ✅ | ✅ |
433
- | ClickHouse* | ✅ | ✅ | ✅ | ✅ | ❌ |
434
- | **Planned for hostdb** |||||
435
- | CockroachDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
436
- | TimescaleDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
437
- | Meilisearch | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
438
- | OpenSearch | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
439
- | QuestDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
440
- | FerretDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
441
- | TiDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
442
- | ArangoDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
443
- | Qdrant | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
444
- | Apache Cassandra | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
445
- | InfluxDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
446
- | CouchDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
447
- | KeyDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
448
- | libSQL | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
449
- | FoundationDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
450
- | RocksDB | 🟪 | 🟪 | 🟪 | 🟪 | 🟪 |
451
-
452
- **Notes:**
453
- - **\*** Licensing considerations for commercial use — consider Valkey (Redis) or FerretDB (MongoDB) as alternatives
454
- - **PostgreSQL** uses [EDB](https://www.enterprisedb.com/) binaries on Windows instead of hostdb
455
- - **ClickHouse** Windows binaries are not available on hostdb (macOS and Linux only)
456
- - **Valkey** is a Redis-compatible drop-in replacement with permissive licensing
457
- - **CockroachDB** is planned for both hostdb and SpinDB (see [roadmap](TODO.md))
458
- - All databases under "Planned for hostdb" have permissive open-source licenses (Apache 2.0, MIT, or BSD)
459
-
460
- For the latest platform support, see the [hostdb databases.json](https://github.com/robertjbass/hostdb/blob/main/databases.json).
325
+ # Configuration
326
+ spindb config show # Show current config
327
+ spindb config detect # Re-detect tool paths
328
+ spindb config update-check on # Enable update notifications
461
329
 
462
- ---
330
+ # System health
331
+ spindb doctor # Interactive health check
332
+ spindb doctor --json # JSON output
463
333
 
464
- ## Commands
334
+ # Version management
335
+ spindb version # Show current version
336
+ spindb version --check # Check for updates
337
+ spindb self-update # Update to latest version
338
+ ```
465
339
 
466
- ### Container Lifecycle
340
+ ### Interactive Menu
467
341
 
468
- #### `create` - Create a new container
342
+ Don't want to remember commands? Just run:
469
343
 
470
344
  ```bash
471
- spindb create mydb # PostgreSQL (default)
472
- spindb create mydb --engine mariadb # MariaDB
473
- spindb create mydb --engine mysql # MySQL
474
- spindb create mydb --engine sqlite # SQLite (file-based)
475
- spindb create mydb --db-version 16 # Specific PostgreSQL version
476
- spindb create mydb --port 5433 # Custom port
477
- spindb create mydb --database my_app # Custom database name
478
- spindb create mydb --no-start # Create without starting
479
-
480
- # Create, start, and connect in one command
481
- spindb create mydb --start --connect
482
-
483
- # SQLite with custom path
484
- spindb create mydb --engine sqlite --path ./data/app.sqlite
345
+ spindb
485
346
  ```
486
347
 
487
- Create and restore in one command:
348
+ You'll get an interactive menu with arrow-key navigation for all operations. **The menu is just a friendlier interface—everything is also available as a direct CLI command.**
488
349
 
489
- ```bash
490
- spindb create mydb --from ./backup.dump
491
- spindb create mydb --from "postgresql://user:pass@host:5432/production"
492
- ```
350
+ ---
493
351
 
494
- <details>
495
- <summary>All options</summary>
352
+ ## How It Works
496
353
 
497
- | Option | Description |
498
- |--------|-------------|
499
- | `--engine`, `-e` | Database engine (`postgresql`, `mariadb`, `mysql`, `sqlite`, `duckdb`, `mongodb`, `redis`, `valkey`, `clickhouse`) |
500
- | `--db-version` | Engine version (e.g., 17 for PostgreSQL, 11.8 for MariaDB, 8 for Redis, 9 for Valkey) |
501
- | `--port`, `-p` | Port number (not applicable for SQLite) |
502
- | `--database`, `-d` | Primary database name (Redis uses 0-15) |
503
- | `--path` | File path for SQLite databases |
504
- | `--max-connections` | Maximum database connections (default: 200) |
505
- | `--from` | Restore from backup file or connection string |
506
- | `--start` | Start container after creation (skip prompt) |
507
- | `--no-start` | Create without starting |
508
- | `--connect` | Open a shell connection after creation |
354
+ ### Architecture
509
355
 
510
- </details>
356
+ SpinDB uses "container" terminology loosely—there's no Docker involved. When you create a container, SpinDB:
511
357
 
512
- #### `start` - Start a container
358
+ 1. **Downloads database binaries** from [hostdb](https://github.com/robertjbass/hostdb) or uses system installations
359
+ 2. **Creates isolated data directories** at `~/.spindb/containers/{engine}/{name}/`
360
+ 3. **Runs databases as native processes** on your machine
513
361
 
514
- ```bash
515
- spindb start mydb
516
- ```
362
+ Each container contains:
363
+ - `container.json` - Configuration (port, version, status)
364
+ - `data/` - Database files
365
+ - `{engine}.log` - Server logs
517
366
 
518
- #### `stop` - Stop a container
367
+ ### Storage Layout
519
368
 
520
369
  ```bash
521
- spindb stop mydb
370
+ ~/.spindb/
371
+ ├── bin/ # Downloaded binaries
372
+ │ ├── postgresql-18.1.0-darwin-arm64/ # ~45 MB
373
+ │ ├── mysql-9.0.1-darwin-arm64/ # ~200 MB
374
+ │ └── mongodb-8.0-darwin-arm64/ # ~200 MB
375
+ ├── containers/ # Server-based databases
376
+ │ ├── postgresql/
377
+ │ │ └── myapp/
378
+ │ │ ├── container.json
379
+ │ │ ├── data/
380
+ │ │ └── postgres.log
381
+ │ ├── mysql/
382
+ │ └── mongodb/
383
+ ├── logs/ # SpinDB error logs
384
+ └── config.json # Tool paths and settings
385
+
386
+ # File-based databases (SQLite, DuckDB) store in project directories
387
+ ./myproject/
388
+ └── app.sqlite # Created with: spindb create app -e sqlite
522
389
  ```
523
390
 
524
- #### `delete` - Delete a container
525
-
526
- ```bash
527
- spindb delete mydb
528
- spindb delete mydb --yes # Skip confirmation prompt
529
- spindb delete mydb --force # Force stop if running
530
- spindb delete mydb -fy # Both: force stop + skip confirmation
531
- ```
391
+ ### Data Persistence
532
392
 
533
- <details>
534
- <summary>All options</summary>
393
+ Databases run as **native processes**, and **data persists across restarts**. When you stop a container:
535
394
 
536
- | Option | Description |
537
- |--------|-------------|
538
- | `--force`, `-f` | Force stop if container is running before deleting |
539
- | `--yes`, `-y` | Skip confirmation prompt (for scripts/automation) |
540
- | `--json`, `-j` | Output result as JSON |
395
+ 1. SpinDB sends a graceful shutdown signal
396
+ 2. The database flushes pending writes to disk
397
+ 3. Data remains in the `data/` directory
541
398
 
542
- </details>
399
+ **Your data is never deleted unless you explicitly run `spindb delete`.**
543
400
 
544
- ### Data Operations
401
+ #### Durability by Engine
545
402
 
546
- #### `connect` - Open database shell
403
+ | Engine | Persistence Mechanism | Durability |
404
+ |--------|----------------------|------------|
405
+ | PostgreSQL | Write-Ahead Logging (WAL) | Committed transactions survive crashes |
406
+ | MySQL | InnoDB transaction logs | Committed transactions survive crashes |
407
+ | MariaDB | InnoDB transaction logs | Committed transactions survive crashes |
408
+ | SQLite | File-based transactions | Commits written immediately to disk |
409
+ | DuckDB | File-based transactions | Commits written immediately to disk |
410
+ | MongoDB | WiredTiger journaling | Writes journaled before acknowledged |
411
+ | Redis | RDB snapshots (periodic) | May lose ~60 seconds on unexpected crash |
412
+ | Valkey | RDB snapshots (periodic) | May lose ~60 seconds on unexpected crash |
413
+ | ClickHouse | MergeTree storage | Committed transactions survive crashes |
547
414
 
548
- ```bash
549
- spindb connect mydb # Standard shell (psql/mysql)
550
- spindb connect mydb --pgcli # Enhanced PostgreSQL shell
551
- spindb connect mydb --mycli # Enhanced MySQL shell
552
- spindb connect mydb --tui # Universal SQL client (usql)
553
- ```
415
+ ---
554
416
 
555
- Install enhanced shells on-the-fly:
417
+ ## Engine-Specific Details
556
418
 
557
- ```bash
558
- spindb connect mydb --install-pgcli
559
- spindb connect mydb --install-mycli
560
- spindb connect mydb --install-tui
561
- ```
419
+ Each database engine has unique features and behaviors. See full documentation in [ENGINES.md](ENGINES.md).
562
420
 
563
- #### `run` - Execute SQL/scripts/commands
421
+ ### PostgreSQL 🐘
564
422
 
565
423
  ```bash
566
- spindb run mydb script.sql # Run a SQL file
567
- spindb run mydb -c "SELECT * FROM users" # Run inline SQL
568
- spindb run mydb seed.sql --database my_app # Target specific database
424
+ # Create PostgreSQL database
425
+ spindb create myapp --engine postgresql --db-version 18
569
426
 
570
- # MongoDB uses JavaScript instead of SQL
571
- spindb run mydb seed.js # Run a JavaScript file
572
- spindb run mydb -c "db.users.find().pretty()" # Run inline JavaScript
427
+ # Multiple versions side-by-side
428
+ spindb create legacy --engine postgresql --db-version 14
429
+ spindb create modern --engine postgresql --db-version 18
573
430
 
574
- # Redis uses Redis commands
575
- spindb run myredis -c "SET foo bar" # Run inline command
576
- spindb run myredis seed.redis # Run command file
431
+ # Backup formats
432
+ spindb backup myapp --format sql # Plain SQL (.sql)
433
+ spindb backup myapp --format dump # Binary custom format (.dump)
577
434
  ```
578
435
 
579
- #### `url` - Get connection string
436
+ **Versions:** 15, 16, 17, 18
437
+ **Tools:** `psql`, `pg_dump`, `pg_restore` (included)
438
+ **Enhanced client:** `pgcli` (auto-completion, syntax highlighting)
439
+
440
+ ### MySQL 🐬 & MariaDB 🦭
580
441
 
581
442
  ```bash
582
- spindb url mydb # postgresql://postgres@localhost:5432/mydb
583
- spindb url mydb --copy # Copy to clipboard
584
- spindb url mydb --json # JSON output with details
443
+ # MySQL
444
+ spindb create shop --engine mysql --db-version 9
445
+ spindb connect shop --mycli
585
446
 
586
- # Use in scripts
587
- export DATABASE_URL=$(spindb url mydb)
588
- psql $(spindb url mydb)
447
+ # MariaDB (MySQL-compatible)
448
+ spindb create store --engine mariadb --db-version 11.8
589
449
  ```
590
450
 
591
- #### `backup` - Create a backup
592
-
593
- ```bash
594
- spindb backup mydb # Auto-generated filename
595
- spindb backup mydb --name my-backup # Custom name
596
- spindb backup mydb --output ./backups/ # Custom directory
597
- spindb backup mydb --database my_app # Backup specific database
598
- ```
451
+ **MySQL versions:** 8.0, 8.4, 9
452
+ **MariaDB versions:** 10.11, 11.4, 11.8
453
+ **Tools:** `mysql`, `mysqldump`, `mysqladmin` (included)
599
454
 
600
- Backup formats (vary by engine):
455
+ ### MongoDB 🍃
601
456
 
602
457
  ```bash
603
- spindb backup mydb --format sql # Plain SQL (.sql) or text commands (.redis)
604
- spindb backup mydb --format dump # Binary format (.dump for PG, .sql.gz for MySQL, .rdb for Redis)
605
-
606
- # Shorthand
607
- spindb backup mydb --sql
608
- spindb backup mydb --dump
609
- ```
458
+ # Create MongoDB database
459
+ spindb create logs --engine mongodb --db-version 8.0
610
460
 
611
- Format by engine:
612
- - PostgreSQL: `.sql` (plain SQL) / `.dump` (pg_dump custom)
613
- - MariaDB: `.sql` (plain SQL) / `.sql.gz` (compressed SQL)
614
- - MySQL: `.sql` (plain SQL) / `.sql.gz` (compressed SQL)
615
- - SQLite: `.sql` (plain SQL) / `.sqlite` (binary copy)
616
- - DuckDB: `.sql` (plain SQL) / `.duckdb` (binary copy)
617
- - MongoDB: `.bson` (BSON dump) / `.archive` (compressed archive)
618
- - Redis: `.redis` (text commands) / `.rdb` (RDB snapshot)
619
- - Valkey: `.valkey` (text commands) / `.rdb` (RDB snapshot)
620
-
621
- <details>
622
- <summary>All options</summary>
623
-
624
- | Option | Description |
625
- |--------|-------------|
626
- | `--database`, `-d` | Database to backup (defaults to primary) |
627
- | `--name`, `-n` | Custom backup filename (without extension) |
628
- | `--output`, `-o` | Output directory (defaults to current directory) |
629
- | `--format` | Output format: `sql` or `dump` |
630
- | `--sql` | Shorthand for `--format sql` |
631
- | `--dump` | Shorthand for `--format dump` |
632
- | `--json`, `-j` | Output result as JSON |
633
-
634
- </details>
635
-
636
- #### `backups` - List backup files
461
+ # JavaScript queries (not SQL)
462
+ spindb run logs -c "db.users.insertOne({name: 'Alice'})"
463
+ spindb run logs -c "db.users.find().pretty()"
464
+ spindb run logs seed.js
637
465
 
638
- ```bash
639
- spindb backups # List backups in current directory
640
- spindb backups ./data # List backups in specific directory
641
- spindb backups --all # Include ~/.spindb/backups
642
- spindb backups --limit 50 # Show more results
643
- spindb backups --json # JSON output
466
+ # Connect with mongosh
467
+ spindb connect logs
644
468
  ```
645
469
 
646
- <details>
647
- <summary>All options</summary>
648
-
649
- | Option | Description |
650
- |--------|-------------|
651
- | `--all`, `-a` | Include backups from `~/.spindb/backups` |
652
- | `--limit`, `-n` | Limit number of results (default: 20) |
653
- | `--json`, `-j` | Output as JSON |
470
+ **Versions:** 7.0, 8.0, 8.2
471
+ **Query language:** JavaScript (via `mongosh`)
472
+ **Tools:** `mongod`, `mongosh`, `mongodump`, `mongorestore` (included)
654
473
 
655
- </details>
656
-
657
- #### `restore` - Restore from backup
474
+ ### Redis 🔴 & Valkey 🔷
658
475
 
659
476
  ```bash
660
- spindb restore mydb backup.dump
661
- spindb restore mydb backup.sql --database my_app
662
- spindb restore mydb --from-url "postgresql://user:pass@host/db"
663
- ```
477
+ # Redis
478
+ spindb create cache --engine redis --db-version 8
664
479
 
665
- **Restore production data alongside existing databases:**
480
+ # Valkey (Redis fork with BSD-3 license)
481
+ spindb create sessions --engine valkey --db-version 9
666
482
 
667
- ```bash
668
- # Restore into a NEW database without affecting existing data
669
- spindb restore mydb prod-backup.dump --database prod_copy
670
-
671
- # Pull from production into a new local database
672
- spindb restore mydb --from-url "postgresql://user:pass@prod-host/proddb" --database prod_local
483
+ # Redis commands
484
+ spindb run cache -c "SET mykey myvalue"
485
+ spindb run cache -c "GET mykey"
673
486
 
674
- # View all databases in a container
675
- spindb info mydb
487
+ # Enhanced shell
488
+ spindb connect cache --iredis
676
489
  ```
677
490
 
678
- <details>
679
- <summary>All options</summary>
680
-
681
- | Option | Description |
682
- |--------|-------------|
683
- | `--database`, `-d` | Target database name (creates new if doesn't exist) |
684
- | `--from-url` | Pull data from a remote database connection string |
685
- | `--force`, `-f` | Overwrite existing database without confirmation |
686
- | `--json`, `-j` | Output result as JSON |
687
-
688
- </details>
689
-
690
- #### Backup & Restore Format Reference
691
-
692
- Each engine has specific backup formats and restore behaviors:
693
-
694
- <details>
695
- <summary>PostgreSQL</summary>
696
-
697
- | Format | Extension | Tool | Notes |
698
- |--------|-----------|------|-------|
699
- | SQL | `.sql` | pg_dump | Plain text SQL, human-readable |
700
- | Custom | `.dump` | pg_dump -Fc | Compressed, supports parallel restore |
701
-
702
- **Restore behavior:** Creates new database or replaces existing. Uses `pg_restore` for `.dump`, `psql` for `.sql`.
703
-
704
- </details>
705
-
706
- <details>
707
- <summary>MariaDB</summary>
708
-
709
- | Format | Extension | Tool | Notes |
710
- |--------|-----------|------|-------|
711
- | SQL | `.sql` | mariadb-dump | Plain text SQL |
712
- | Compressed | `.sql.gz` | mariadb-dump + gzip | Gzip compressed SQL |
713
-
714
- **Restore behavior:** Creates new database or replaces existing. Pipes to `mariadb` client.
715
-
716
- </details>
717
-
718
- <details>
719
- <summary>MySQL</summary>
720
-
721
- | Format | Extension | Tool | Notes |
722
- |--------|-----------|------|-------|
723
- | SQL | `.sql` | mysqldump | Plain text SQL |
724
- | Compressed | `.sql.gz` | mysqldump + gzip | Gzip compressed SQL |
725
-
726
- **Restore behavior:** Creates new database or replaces existing. Pipes to `mysql` client.
491
+ **Redis versions:** 7, 8
492
+ **Valkey versions:** 8, 9
493
+ **Query language:** Redis commands
494
+ **Databases:** Numbered 0-15 (not named)
495
+ **Tools:** `redis-cli`, `redis-server` / `valkey-cli`, `valkey-server` (included)
727
496
 
728
- </details>
497
+ ### SQLite 🪶 & DuckDB 🦆
729
498
 
730
- <details>
731
- <summary>SQLite</summary>
732
-
733
- | Format | Extension | Tool | Notes |
734
- |--------|-----------|------|-------|
735
- | SQL | `.sql` | .dump | Plain text SQL |
736
- | Binary | `.sqlite` | File copy | Exact copy of database file |
737
-
738
- **Restore behavior:** Creates new file or replaces existing.
739
-
740
- </details>
741
-
742
- <details>
743
- <summary>DuckDB</summary>
744
-
745
- | Format | Extension | Tool | Notes |
746
- |--------|-----------|------|-------|
747
- | SQL | `.sql` | duckdb -c | Plain text SQL |
748
- | Binary | `.duckdb` | File copy | Exact copy of database file |
749
-
750
- **Restore behavior:** Creates new file or replaces existing.
751
-
752
- </details>
753
-
754
- <details>
755
- <summary>MongoDB</summary>
756
-
757
- | Format | Extension | Tool | Notes |
758
- |--------|-----------|------|-------|
759
- | BSON | `.bson` | mongodump | Binary JSON per collection |
760
- | Archive | `.archive` | mongodump --archive | Single compressed file |
761
-
762
- **Restore behavior:** Creates new database or replaces existing. Uses `mongorestore`.
763
-
764
- </details>
765
-
766
- <details>
767
- <summary>Redis</summary>
768
-
769
- | Format | Extension | Tool | Notes |
770
- |--------|-----------|------|-------|
771
- | RDB | `.rdb` | BGSAVE | Binary snapshot, requires restart |
772
- | Text | `.redis` | Custom | Human-readable Redis commands |
773
-
774
- **Text format detection:** Files are detected as Redis text commands if they contain valid Redis commands (SET, HSET, DEL, etc.), regardless of file extension. This allows restoring files like `users.txt` or `data` without renaming.
499
+ ```bash
500
+ # SQLite - embedded relational database
501
+ spindb create app --engine sqlite --path ./data/app.sqlite
502
+ spindb connect app
775
503
 
776
- **Restore behavior:**
777
- - **RDB (`.rdb`):** Requires stopping Redis, copies file to data directory, restart loads data
778
- - **Text (`.redis`):** Pipes commands to running Redis instance. Prompts for:
779
- - **Replace all:** Runs `FLUSHDB` first (clean slate)
780
- - **Merge:** Adds/updates keys, keeps existing keys not in backup
504
+ # DuckDB - embedded analytics database (OLAP)
505
+ spindb create analytics --engine duckdb --path ./data/warehouse.duckdb
506
+ spindb connect analytics
507
+ ```
781
508
 
782
- **Note:** Redis uses numbered databases (0-15) that always exist. "Create new database" is not applicable.
509
+ **No server process** - File-based databases stored in your project directories.
510
+ **No start/stop needed** - Always "running" (embedded).
511
+ **SQLite tools:** `sqlite3`, `sqldiff`, `sqlite3_analyzer` (included)
512
+ **DuckDB tools:** `duckdb` (included)
783
513
 
784
- </details>
514
+ ### ClickHouse 🏠
785
515
 
786
- <details>
787
- <summary>Valkey</summary>
516
+ ```bash
517
+ # Create ClickHouse database (columnar OLAP)
518
+ spindb create warehouse --engine clickhouse
788
519
 
789
- | Format | Extension | Tool | Notes |
790
- |--------|-----------|------|-------|
791
- | RDB | `.rdb` | BGSAVE | Binary snapshot, requires restart |
792
- | Text | `.valkey` | Custom | Human-readable Redis-compatible commands |
520
+ # SQL with ClickHouse extensions
521
+ spindb run warehouse -c "CREATE TABLE events (timestamp DateTime, user_id UInt64) ENGINE = MergeTree() ORDER BY timestamp"
522
+ spindb run warehouse -c "SELECT * FROM system.tables"
523
+ ```
793
524
 
794
- **Text format detection:** Files are detected as Valkey text commands if they contain valid Redis commands (SET, HSET, DEL, etc.), regardless of file extension.
525
+ **Version:** 25.12 (YY.MM versioning)
526
+ **Platforms:** macOS, Linux (no Windows support)
527
+ **Ports:** 9000 (native TCP), 8123 (HTTP)
528
+ **Tools:** `clickhouse-client`, `clickhouse-server` (included)
795
529
 
796
- **Restore behavior:** Same as Redis (Valkey is Redis-compatible).
797
- - **RDB (`.rdb`):** Requires stopping Valkey, copies file to data directory, restart loads data
798
- - **Text (`.valkey`):** Pipes commands to running Valkey instance. Prompts for:
799
- - **Replace all:** Runs `FLUSHDB` first (clean slate)
800
- - **Merge:** Adds/updates keys, keeps existing keys not in backup
530
+ ---
801
531
 
802
- **Note:** Valkey uses numbered databases (0-15) that always exist. "Create new database" is not applicable.
532
+ ## Enhanced CLI Tools
803
533
 
804
- </details>
534
+ SpinDB supports enhanced database shells with auto-completion, syntax highlighting, and better formatting:
805
535
 
806
- ### Container Management
536
+ | Engine | Standard Client | Enhanced Client | Universal Client |
537
+ |--------|----------------|-----------------|------------------|
538
+ | PostgreSQL | `psql` | `pgcli` | `usql` |
539
+ | MySQL | `mysql` | `mycli` | `usql` |
540
+ | MariaDB | `mariadb` | `mycli` | `usql` |
541
+ | SQLite | `sqlite3` | `litecli` | `usql` |
542
+ | DuckDB | `duckdb` | - | `usql` |
543
+ | MongoDB | `mongosh` | - | - |
544
+ | Redis | `redis-cli` | `iredis` | - |
545
+ | Valkey | `valkey-cli` | `iredis` (compatible) | - |
546
+ | ClickHouse | `clickhouse-client` | - | `usql` |
807
547
 
808
- #### `list` - List all containers
548
+ Install and use in one command:
809
549
 
810
550
  ```bash
811
- spindb list
812
- spindb list --json
551
+ spindb connect mydb --install-pgcli
552
+ spindb connect mydb --install-mycli
553
+ spindb connect mydb --install-tui # usql (universal)
813
554
  ```
814
555
 
815
- #### `info` - Show container details
556
+ ---
816
557
 
817
- ```bash
818
- spindb info # All containers
819
- spindb info mydb # Specific container
820
- spindb info mydb --json
821
- ```
558
+ ## Backup & Restore
822
559
 
823
- #### `clone` - Clone a container
560
+ Every engine supports backup and restore with engine-specific formats:
824
561
 
825
- ```bash
826
- spindb stop source-db # Source must be stopped
827
- spindb clone source-db new-db
828
- spindb start new-db
829
- ```
562
+ ### PostgreSQL
830
563
 
831
- #### `edit` - Rename, change port, relocate, or edit database config
564
+ | Format | Extension | Tool | Use Case |
565
+ |--------|-----------|------|----------|
566
+ | SQL | `.sql` | pg_dump | Human-readable, portable |
567
+ | Custom | `.dump` | pg_dump -Fc | Compressed, faster restore |
832
568
 
833
569
  ```bash
834
- spindb edit mydb --name newname # Must be stopped
835
- spindb edit mydb --port 5433
836
- spindb edit mydb --relocate ~/new/path # Move SQLite database file
837
- spindb edit mydb --set-config max_connections=300 # PostgreSQL config
838
- spindb edit mydb # Interactive mode
570
+ spindb backup mydb --sql # Plain SQL
571
+ spindb backup mydb --dump # Binary custom format
572
+ spindb restore mydb backup.dump
839
573
  ```
840
574
 
841
- #### `logs` - View container logs
575
+ ### MySQL & MariaDB
576
+
577
+ | Format | Extension | Tool | Use Case |
578
+ |--------|-----------|------|----------|
579
+ | SQL | `.sql` | mysqldump / mariadb-dump | Human-readable |
580
+ | Compressed | `.sql.gz` | mysqldump + gzip | Smaller file size |
842
581
 
843
582
  ```bash
844
- spindb logs mydb
845
- spindb logs mydb --follow # Follow mode (like tail -f)
846
- spindb logs mydb -n 50 # Last 50 lines
847
- spindb logs mydb --editor # Open in $EDITOR
583
+ spindb backup mydb --sql # Plain SQL
584
+ spindb backup mydb --dump # Compressed SQL
848
585
  ```
849
586
 
850
- ### Engine & System
587
+ ### MongoDB
851
588
 
852
- #### `engines` - Manage installed engines
589
+ | Format | Extension | Tool | Use Case |
590
+ |--------|-----------|------|----------|
591
+ | BSON | `.bson` | mongodump | Binary, preserves all types |
592
+ | Archive | `.archive` | mongodump --archive | Single compressed file |
853
593
 
854
594
  ```bash
855
- spindb engines # List installed engines
856
- spindb engines list --json # JSON output
857
- spindb engines supported # List all supported engines
858
- spindb engines supported --json # Full engine config as JSON
859
- spindb engines supported --all # Include pending/planned engines
860
- spindb engines delete postgresql 16 # Delete a version (frees ~45MB)
595
+ spindb backup mydb # BSON directory
596
+ spindb backup mydb --format archive # Single .archive file
861
597
  ```
862
598
 
863
- Example output:
599
+ ### Redis & Valkey
864
600
 
865
- ```
866
- ENGINE VERSION SOURCE SIZE
867
- ────────────────────────────────────────────────────────
868
- 🐘 postgresql 18.1 darwin-arm64 46.0 MB
869
- 🐘 postgresql 17.7 darwin-arm64 45.2 MB
870
- 🐬 mysql 9.0.1 darwin-arm64 150.0 MB
871
- 🪶 sqlite 3.51.2 darwin-arm64 5.0 MB
872
- ────────────────────────────────────────────────────────
873
-
874
- PostgreSQL: 2 version(s), 90.0 MB
875
- MySQL: 1 version(s), 150.0 MB
876
- SQLite: 1 version(s), 5.0 MB
877
- ```
601
+ | Format | Extension | Tool | Use Case |
602
+ |--------|-----------|------|----------|
603
+ | RDB | `.rdb` | BGSAVE | Binary snapshot, requires restart |
604
+ | Text | `.redis` / `.valkey` | Custom | Human-readable commands |
878
605
 
879
- `spindb engines supported` output:
606
+ ```bash
607
+ spindb backup mydb --dump # RDB snapshot
608
+ spindb backup mydb --sql # Text commands
880
609
 
610
+ # Restore with merge or replace strategy
611
+ spindb restore mydb backup.redis # Prompts: Replace all / Merge
881
612
  ```
882
- 🐘 postgresql
883
- 🐬 mysql
884
- 🦭 mariadb
885
- 🪶 sqlite
886
- 🦆 duckdb
887
- 🍃 mongodb
888
- 🔴 redis
889
- 🔷 valkey
890
- 🏠 clickhouse
891
- ```
892
-
893
- #### `deps` - Manage client tools
894
613
 
895
- ```bash
896
- spindb deps check # Check all dependencies
897
- spindb deps check --engine postgresql # Check specific engine
898
- spindb deps install # Install missing tools
899
- spindb deps install --engine mysql # Install for specific engine
900
- ```
614
+ ### SQLite & DuckDB
901
615
 
902
- #### `config` - Configuration
616
+ | Format | Extension | Tool | Use Case |
617
+ |--------|-----------|------|----------|
618
+ | SQL | `.sql` | .dump / duckdb | Human-readable |
619
+ | Binary | `.sqlite` / `.duckdb` | File copy | Exact database copy |
903
620
 
904
621
  ```bash
905
- spindb config show # Show current configuration
906
- spindb config detect # Re-detect tool paths
907
- spindb config update-check on # Enable update notifications
908
- spindb config update-check off # Disable update notifications
622
+ spindb backup mydb --sql # SQL dump
623
+ spindb backup mydb --dump # Binary copy
909
624
  ```
910
625
 
911
- #### `version` - Version info
912
-
913
- ```bash
914
- spindb version
915
- spindb version --check # Check for updates
916
- ```
626
+ ### ClickHouse
917
627
 
918
- #### `self-update` - Update SpinDB
628
+ | Format | Extension | Tool | Use Case |
629
+ |--------|-----------|------|----------|
630
+ | SQL | `.sql` | clickhouse-client | Plain SQL dump |
631
+ | Native | `.clickhouse` | clickhouse-backup | Native format (future) |
919
632
 
920
633
  ```bash
921
- spindb self-update
634
+ spindb backup mydb --sql # SQL dump
922
635
  ```
923
636
 
924
- #### `doctor` - System health check
637
+ ---
925
638
 
926
- ```bash
927
- spindb doctor # Interactive health check
928
- spindb doctor --json # JSON output for scripting
929
- ```
639
+ ## Advanced Features
930
640
 
931
- Checks performed:
932
- - Configuration file validity and binary cache freshness
933
- - Container status across all engines
934
- - SQLite registry for orphaned entries (files deleted outside SpinDB)
935
- - Database tool availability
641
+ ### Clone Databases
936
642
 
937
- Example output:
643
+ Create exact copies of existing databases:
938
644
 
645
+ ```bash
646
+ # Clone local database (must be stopped)
647
+ spindb stop production
648
+ spindb clone production staging
649
+ spindb start production
650
+ spindb start staging
939
651
  ```
940
- SpinDB Health Check
941
- ═══════════════════
942
652
 
943
- Configuration
944
- └─ Configuration valid, 12 tools cached
653
+ ### Restore from Remote
945
654
 
946
- Containers
947
- └─ 4 container(s)
948
- postgresql: 2 running, 0 stopped
949
- mysql: 0 running, 1 stopped
950
- sqlite: 1 exist, 0 missing
655
+ Pull production data into local databases:
951
656
 
952
- ⚠ SQLite Registry
953
- └─ 1 orphaned entry found
954
- "old-project" /path/to/missing.sqlite
657
+ ```bash
658
+ # Create new database from remote
659
+ spindb create prod-copy --from "postgresql://user:pass@prod-host:5432/production"
955
660
 
956
- ? What would you like to do?
957
- Remove orphaned entries from registry
958
- Skip (do nothing)
661
+ # Or restore into existing database
662
+ spindb restore mydb --from-url "postgresql://user:pass@prod-host:5432/production"
959
663
  ```
960
664
 
961
- ---
665
+ ### Multi-Version Support
962
666
 
963
- ## Enhanced CLI Tools
667
+ Run different versions of the same database simultaneously:
964
668
 
965
- SpinDB supports enhanced database shells that provide features like auto-completion, syntax highlighting, and better output formatting.
669
+ ```bash
670
+ # PostgreSQL 14 for legacy app
671
+ spindb create legacy-api --engine postgresql --db-version 14 --port 5432
966
672
 
967
- | Engine | Standard | Enhanced | Universal |
968
- |--------|----------|----------|-----------|
969
- | PostgreSQL | `psql` | `pgcli` | `usql` |
970
- | MariaDB | `mariadb` | `mycli` | `usql` |
971
- | MySQL | `mysql` | `mycli` | `usql` |
972
- | SQLite | `sqlite3` | `litecli` | `usql` |
973
- | DuckDB | `duckdb` | - | `usql` |
974
- | MongoDB | `mongosh` | - | `usql` |
975
- | Redis | `redis-cli` | `iredis` | - |
976
- | Valkey | `valkey-cli` | `iredis` | - |
673
+ # PostgreSQL 18 for new app
674
+ spindb create modern-api --engine postgresql --db-version 18 --port 5433
977
675
 
978
- **pgcli / mycli** provide:
979
- - Intelligent auto-completion (tables, columns, keywords)
980
- - Syntax highlighting
981
- - Multi-line editing
982
- - Query history with search
676
+ # Both running at the same time
677
+ spindb list
678
+ # NAME ENGINE VERSION PORT STATUS
679
+ # legacy-api postgresql 14 5432 running
680
+ # modern-api postgresql 18 5433 running
681
+ ```
983
682
 
984
- **usql** is a universal SQL client that works with any database. Great if you work with multiple engines.
683
+ ### Custom Ports
985
684
 
986
- Install and connect in one command:
685
+ SpinDB auto-assigns ports, but you can override:
987
686
 
988
687
  ```bash
989
- spindb connect mydb --install-pgcli
990
- spindb connect mydb --install-mycli
991
- spindb connect mydb --install-tui # usql
688
+ spindb create mydb --port 5433
689
+ spindb edit mydb --port 5434 # Change later
992
690
  ```
993
691
 
994
- ---
995
-
996
- ## Architecture
692
+ ### SQLite & DuckDB Registry
997
693
 
998
- ### How It Works
694
+ File-based databases can be registered for easy access:
999
695
 
1000
- SpinDB uses the term "container" loosely—there's no Docker involved. When you create a container, SpinDB:
1001
-
1002
- 1. Downloads the database server binary (or uses your system's installation)
1003
- 2. Creates an isolated data directory at `~/.spindb/containers/{engine}/{name}/`
1004
- 3. Runs the database as a native process on your machine
1005
-
1006
- Each "container" is just:
1007
- - A configuration file (`container.json`)
1008
- - A data directory (`data/`)
1009
- - A log file (`postgres.log`, `mysql.log`, or `mongodb.log`)
696
+ ```bash
697
+ # Create and register
698
+ spindb create mydb --engine sqlite --path ./data/app.sqlite
1010
699
 
1011
- Native processes mean instant startup and no virtualization overhead.
700
+ # Attach existing database
701
+ spindb attach ./existing/data.sqlite --name legacy-db
1012
702
 
1013
- ### Storage Layout
1014
-
1015
- ```
1016
- ~/.spindb/
1017
- ├── bin/ # Downloaded server binaries
1018
- │ └── postgresql-18.1.0-darwin-arm64/ # ~45 MB per version
1019
- ├── containers/
1020
- │ ├── postgresql/
1021
- │ │ └── mydb/
1022
- │ │ ├── container.json # Configuration
1023
- │ │ ├── data/ # Database files
1024
- │ │ └── postgres.log # Server logs
1025
- │ └── mysql/
1026
- │ └── mydb/
1027
- │ ├── container.json
1028
- │ ├── data/
1029
- │ └── mysql.log
1030
- ├── logs/ # Error logs
1031
- └── config.json # Tool paths cache
1032
-
1033
- # SQLite databases are stored in project directories, not ~/.spindb/
1034
- ./myproject/
1035
- └── mydb.sqlite # Created with: spindb create mydb -e sqlite
703
+ # Detach (removes from registry, keeps file)
704
+ spindb detach legacy-db
1036
705
  ```
1037
706
 
1038
- ### Data Persistence
1039
-
1040
- SpinDB runs databases as **native processes** on your machine. When you start a container:
1041
-
1042
- 1. SpinDB launches the database server binary (`pg_ctl start` or `mysqld`)
1043
- 2. The server binds to `127.0.0.1` on your configured port
1044
- 3. A PID file tracks the running process
1045
- 4. Logs are written to the container's log file
1046
-
1047
- When you stop a container:
1048
-
1049
- 1. SpinDB sends a graceful shutdown signal
1050
- 2. The database flushes pending writes to disk
1051
- 3. The PID file is removed
1052
- 4. Your data remains in the `data/` directory
1053
-
1054
- **Your data is never deleted unless you explicitly delete the container.**
1055
-
1056
- #### Persistence by Engine
1057
-
1058
- Each database engine has its own persistence mechanism:
1059
-
1060
- | Engine | Mechanism | Durability |
1061
- |--------|-----------|------------|
1062
- | PostgreSQL | Write-Ahead Logging (WAL) | Every commit is immediately durable |
1063
- | MariaDB | InnoDB transaction logs | Every commit is immediately durable |
1064
- | MySQL | InnoDB transaction logs | Every commit is immediately durable |
1065
- | SQLite | File-based transactions | Every commit is immediately durable |
1066
- | MongoDB | WiredTiger with journaling | Writes journaled before acknowledged |
1067
- | Redis | RDB snapshots | Periodic snapshots (see below) |
1068
-
1069
- **PostgreSQL, MariaDB, MySQL, MongoDB:** These engines use transaction logs or journaling. Every committed write is guaranteed to survive a crash or unexpected shutdown.
1070
-
1071
- **SQLite:** As a file-based database, SQLite writes directly to disk on each commit. No server process means no risk of losing in-flight data.
1072
-
1073
- **Redis:** SpinDB configures Redis with RDB (Redis Database) snapshots:
1074
- - Save after 900 seconds if at least 1 key changed
1075
- - Save after 300 seconds if at least 10 keys changed
1076
- - Save after 60 seconds if at least 10,000 keys changed
1077
-
1078
- This means Redis may lose up to ~60 seconds of writes on an unexpected crash. For local development, this trade-off (speed over strict durability) is typically acceptable. If you need stronger guarantees, use `spindb backup` before stopping work.
1079
-
1080
- ### Binary Sources
1081
-
1082
- **PostgreSQL:** Server binaries are downloaded automatically:
1083
- - **macOS/Linux:** From [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases
1084
- - **Windows:** From [EnterpriseDB (EDB)](https://www.enterprisedb.com/download-postgresql-binaries)
1085
-
1086
- **MariaDB, MySQL, MongoDB, Redis, Valkey:** Server binaries are downloaded automatically from [hostdb](https://github.com/robertjbass/hostdb) on GitHub Releases for all platforms.
1087
-
1088
- ### Why Precompiled Binaries?
1089
-
1090
- The [hostdb](https://github.com/robertjbass/hostdb) project provides pre-compiled, portable database binaries:
1091
-
1092
- - Cross-platform (macOS Intel/ARM, Linux x64/ARM, Windows x64)
1093
- - Hosted on GitHub Releases (highly reliable CDN)
1094
- - ~45-200 MB per version depending on engine
1095
- - Actively maintained with new database releases
1096
-
1097
- This makes multi-version support trivial: need PostgreSQL 14 for a legacy project and 18 for a new one? Need MongoDB 7.0 and 8.0? Redis 7 and 8? SpinDB downloads them all, and they run side-by-side without conflicts.
1098
-
1099
- ---
1100
-
1101
- ## Limitations
1102
-
1103
- - **Local only** - Databases bind to `127.0.0.1`; remote connections planned for v1.1
1104
- - **Redis remote dump not supported** - Redis doesn't support creating containers from remote connection strings. Use backup/restore for data migration.
1105
-
1106
707
  ---
1107
708
 
1108
709
  ## Roadmap
1109
710
 
1110
- See [TODO.md](TODO.md) for the full roadmap.
711
+ See [TODO.md](TODO.md) for the complete roadmap.
1111
712
 
1112
713
  ### v1.1 - Remote Connections & Secrets
1113
- - Connect to remote databases
714
+ - Direct remote database connections (`spindb connect --remote`)
1114
715
  - Environment variable support in connection strings
1115
- - Secrets management (macOS Keychain)
716
+ - Secrets management with macOS Keychain integration
1116
717
 
1117
718
  ### v1.2 - Additional Engines
1118
- - CockroachDB (distributed SQL)
719
+ - **CockroachDB** - Distributed PostgreSQL-compatible database
720
+ - **FerretDB** - MongoDB-compatible database built on PostgreSQL
1119
721
 
1120
722
  ### v1.3 - Advanced Features
1121
- - Container templates
1122
- - Scheduled backups
1123
- - Import from Docker
723
+ - Container templates for common configurations
724
+ - Scheduled automated backups
725
+ - Import databases from Docker containers
1124
726
 
1125
- ### Future Infrastructure
1126
- - **hostdb npm package**: Available database versions will be published as an npm package from [hostdb](https://github.com/robertjbass/hostdb) and imported into SpinDB, eliminating the need to manually sync version-maps.ts with releases.json
1127
- - **pnpm 10 upgrade**: Currently pinned to pnpm 9.x (`packageManager` in package.json and Docker). Consider upgrading to pnpm 10.x when stable—requires updating package.json, Dockerfile, regenerating pnpm-lock.yaml, and testing for lockfile format changes
727
+ ### Future Engines Under Consideration
1128
728
 
1129
- ### Possible Future Engines
1130
-
1131
- These engines are under consideration but not yet on the roadmap. Community interest and feasibility will determine priority:
729
+ The following engines may be added based on community interest:
1132
730
 
1133
731
  | Engine | Type | Notes |
1134
732
  |--------|------|-------|
1135
- | **libSQL** | Embedded relational | SQLite fork by Turso with replication and edge support |
1136
- | **Meilisearch** | Search engine | Developer-friendly search, good binary distribution |
1137
- | **Elasticsearch/OpenSearch** | Search engine | Full-text search, common in web applications |
1138
- | **Neo4j** | Graph database | Most popular graph database |
1139
- | **InfluxDB** | Time-series | IoT, metrics, and monitoring use cases |
733
+ | **libSQL** | Embedded relational | SQLite fork with replication |
734
+ | **Meilisearch** | Search engine | Developer-friendly full-text search |
735
+ | **OpenSearch** | Search engine | Elasticsearch alternative |
736
+ | **InfluxDB** | Time-series | Metrics and IoT data |
737
+ | **Neo4j** | Graph database | Relationships and network data |
738
+
739
+ ---
740
+
741
+ ## Limitations
742
+
743
+ - **Local only** - Databases bind to `127.0.0.1`. Remote connection support planned for v1.1.
744
+ - **ClickHouse Windows** - Not supported (hostdb doesn't build for Windows).
745
+ - **Redis/Valkey remote dump** - Cannot create containers directly from remote connection strings. Use backup/restore workflow instead.
1140
746
 
1141
747
  ---
1142
748
 
1143
749
  ## Troubleshooting
1144
750
 
1145
- ### Port already in use
751
+ ### Port Already in Use
1146
752
 
1147
- SpinDB automatically finds an available port. To specify one:
753
+ SpinDB automatically finds available ports, but you can specify:
1148
754
 
1149
755
  ```bash
1150
756
  spindb create mydb --port 5433
1151
757
  ```
1152
758
 
1153
- ### Client tool not found
759
+ ### Container Won't Start
1154
760
 
1155
- Install client tools or configure manually:
761
+ Check the logs:
1156
762
 
1157
763
  ```bash
1158
- spindb deps install
764
+ spindb logs mydb
1159
765
  # or
1160
- spindb config set psql /path/to/psql
766
+ cat ~/.spindb/containers/postgresql/mydb/postgres.log
1161
767
  ```
1162
768
 
1163
- ### Container won't start
769
+ ### Client Tool Not Found
1164
770
 
1165
- Check the logs:
771
+ Install dependencies:
1166
772
 
1167
773
  ```bash
1168
- spindb logs mydb
1169
- # or read directly
1170
- cat ~/.spindb/containers/postgresql/mydb/postgres.log
774
+ spindb deps install
775
+ spindb deps check
1171
776
  ```
1172
777
 
1173
- ### Reset everything
778
+ ### Binary Download Fails
779
+
780
+ SpinDB downloads from [hostdb GitHub Releases](https://github.com/robertjbass/hostdb/releases). If downloads fail:
781
+
782
+ 1. Check your internet connection
783
+ 2. Verify GitHub isn't blocked by your firewall
784
+ 3. Try again (SpinDB has automatic retry logic)
785
+
786
+ ### Reset Everything
1174
787
 
1175
788
  ```bash
1176
789
  rm -rf ~/.spindb
1177
790
  ```
1178
791
 
792
+ This deletes all containers, binaries, and configuration. Use with caution.
793
+
1179
794
  ---
1180
795
 
1181
796
  ## Contributing
1182
797
 
1183
- Note: This repo currently assumes `pnpm` for running tests. `npm test` will shell out to `pnpm` and fail if `pnpm` isn't installed.
798
+ We welcome contributions! SpinDB is built with:
799
+
800
+ - **Runtime:** Node.js 18+ with TypeScript
801
+ - **Execution:** `tsx` for direct TypeScript execution
802
+ - **Package Manager:** pnpm (strictly enforced)
803
+ - **CLI Framework:** Commander.js
804
+ - **Interactive UI:** Inquirer.js, Chalk, Ora
1184
805
 
1185
- See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing, and distribution info.
806
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and testing guidelines.
1186
807
 
1187
- See [ARCHITECTURE.md](ARCHITECTURE.md) for project architecture and comprehensive CLI command examples.
808
+ See [ARCHITECTURE.md](ARCHITECTURE.md) for project architecture details.
1188
809
 
1189
810
  See [CLAUDE.md](CLAUDE.md) for AI-assisted development context.
1190
811
 
1191
- See [ENGINES.md](ENGINES.md) for detailed engine documentation (backup formats, planned engines, etc.).
812
+ See [FEATURE.md](FEATURE.md) for adding new database engines.
1192
813
 
1193
814
  ---
1194
815
 
1195
816
  ## Acknowledgments
1196
817
 
1197
- SpinDB wouldn't be possible without:
818
+ SpinDB is powered by:
1198
819
 
1199
- - **[hostdb](https://github.com/robertjbass/hostdb)** - Pre-compiled database binaries (PostgreSQL, MySQL, MariaDB, SQLite, DuckDB, MongoDB, Redis, Valkey, ClickHouse) that make Docker-free local databases possible. Hosted on GitHub Releases for reliable, fast downloads.
820
+ - **[hostdb](https://github.com/robertjbass/hostdb)** - Pre-compiled database binaries for 9 engines across all major platforms. Makes Docker-free multi-version database support possible.
1200
821
 
1201
822
  ---
1202
823
 
@@ -1204,9 +825,26 @@ SpinDB wouldn't be possible without:
1204
825
 
1205
826
  [PolyForm Noncommercial 1.0.0](LICENSE)
1206
827
 
1207
- SpinDB is free for:
828
+ SpinDB is **free** for:
1208
829
  - Personal use and hobby projects
1209
- - Educational and research purposes
1210
- - Nonprofit organizations, educational institutions, and government
830
+ - Educational institutions and students
831
+ - Academic and scientific research
832
+ - Nonprofit organizations
833
+ - Government agencies
834
+
835
+ **Commercial use requires a separate license.** For commercial licensing inquiries, please open an issue or contact the maintainer.
836
+
837
+ ---
838
+
839
+ ## Links
840
+
841
+ - **GitHub:** [github.com/robertjbass/spindb](https://github.com/robertjbass/spindb)
842
+ - **npm:** [npmjs.com/package/spindb](https://www.npmjs.com/package/spindb)
843
+ - **hostdb:** [github.com/robertjbass/hostdb](https://github.com/robertjbass/hostdb)
844
+ - **Issues:** [github.com/robertjbass/spindb/issues](https://github.com/robertjbass/spindb/issues)
845
+
846
+ ---
847
+
848
+ **Questions? Found a bug? Have a feature request?**
1211
849
 
1212
- **SpinDB may not be used for commercial purposes.**
850
+ Open an issue: [github.com/robertjbass/spindb/issues](https://github.com/robertjbass/spindb/issues)