You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New dotnet global tool `cosmokv` (CosmoSQLClient.CosmoKv.Cli) gives an
sqlite3-style shell to any CosmoKv database: REPL, one-shot SQL, stdin
scripts, four output formats (table/csv/tsv/json), and dot-commands for
.tables / .schema / .indexes / .dump / .format.
To make the CLI possible without exposing internal schema types, the
driver gains a small public introspection surface on CosmoKvConnection:
GetTableNames(), GetTableScript(name), GetIndexScriptsForTable(name),
ScriptSchema(). Output round-trips through the parser, so .dump output
is safe to replay against an empty CosmoKv.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
A `sqlite3`-style shell for CosmoKv embedded databases — REPL, one-shot SQL, stdin scripts, and four output formats. Ships as a dotnet global tool.
178
+
179
+
```bash
180
+
dotnet tool install -g CosmoSQLClient.CosmoKv.Cli
181
+
```
182
+
183
+
```bash
184
+
cosmokv ./mydb # REPL
185
+
cosmokv ./mydb "SELECT * FROM Users"# one-shot
186
+
cat schema.sql | cosmokv ./mydb - # stdin script
187
+
cosmokv --format=json ./mydb "SELECT * FROM Users"# JSON output
188
+
```
189
+
190
+
REPL dot-commands cover the usual introspection surface (`.tables`, `.schema [TABLE]`, `.indexes [TABLE]`, `.dump`, `.format FMT`, `.quit`). Full reference: [`src/CosmoSQLClient.CosmoKv.Cli/README.md`](src/CosmoSQLClient.CosmoKv.Cli/README.md).
191
+
192
+
The introspection used by `.schema` / `.dump` is also available programmatically from v2.5 — `CosmoKvConnection.GetTableNames()`, `GetTableScript(name)`, `GetIndexScriptsForTable(name)`, `ScriptSchema()` — so you can build your own dump/backup tooling without going through the CLI.
0 commit comments