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
docs(stack,cli): reconcile living docs to stash eql install + document --eql-version
Update the stash-cli skill and @cipherstash/migrate README to the renamed
`stash eql install` command (keeping `stash db install` documented as the
deprecated alias), and document the new `--eql-version <2|3>` install flag and
its v3 direct-install-only constraints in the skill.
Re-expressed from james/cip-3291-bigint-stack 64fdeb2/d15414a5 docs. Historical
CHANGELOGs and dated design docs are left as point-in-time records; the base
already migrated the domain surface to public.*.
State is tracked in an append-only `cipherstash.cs_migrations` table installed by `stash db install`. The EQL intent (which indexes, which cast_as) continues to live in `eql_v2_configuration` so Proxy continues to work against the same database.
15
+
State is tracked in an append-only `cipherstash.cs_migrations` table installed by `stash eql install`. The EQL intent (which indexes, which cast_as) continues to live in `eql_v2_configuration` so Proxy continues to work against the same database.
16
16
17
17
## API
18
18
@@ -32,7 +32,7 @@ import {
32
32
33
33
### `installMigrationsSchema(client)`
34
34
35
-
Creates `cipherstash.cs_migrations` idempotently. Normally called by `stash db install`.
35
+
Creates `cipherstash.cs_migrations` idempotently. Normally called by `stash eql install`.
Copy file name to clipboardExpand all lines: skills/stash-cli/SKILL.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ export default defineConfig({
90
90
})
91
91
```
92
92
93
-
`db install` will scaffold this file for you if it's missing.
93
+
`eql install` will scaffold this file for you if it's missing.
94
94
95
95
### Config options
96
96
@@ -130,7 +130,7 @@ Init is the **scaffold** save-point. It does mechanical setup only — no agent
130
130
2. **Resolve database** — picks up `DATABASE_URL` from `.env`/`.env.local` or prompts for it. Verifies the connection.
131
131
3. **Build schema** — auto-detects your framework (Drizzle from `drizzle.config.*` / `drizzle-orm` / `drizzle-kit` in `package.json`; Supabase from the `DATABASE_URL` host) and silently writes a placeholder client to `./src/encryption/index.ts`. Only prompts you if a file already exists at that path.
132
132
4. **Install dependencies** — single combined prompt for `@cipherstash/stack` and `stash`. Skipped entirely when both are already in `node_modules`.
133
-
5. **Install EQL** — runs the equivalent of `stashdbinstall` against the resolved database (Drizzle migration, Supabase migration, or direct, per detection). Skipped if EQL is already installed.
133
+
5. **Install EQL** — runs the equivalent of `stasheqlinstall` against the resolved database (Drizzle migration, Supabase migration, or direct, per detection). Skipped if EQL is already installed.
134
134
6. **Gather context** — detects available coding agents (Claude Code, Codex, Cursor, Windsurf, Cline) and writes `.cipherstash/context.json` with integration, package manager, schemas, env keys, and detected agents.
135
135
136
136
When init finishes, it prints a checkmark panel of completed phases and an interactive **chain prompt** (default-yes): *"Continue to `stashplan` now to draft your encryption plan?"* Yes auto-launches `stashplan`. No prints "Next: run `stashplan` to draft your encryption plan." Non-TTY (CI, pipes) skips the prompt and prints the hint.
@@ -257,20 +257,22 @@ stash auth login
257
257
258
258
Opens a browser-based device code flow and saves a token to `~/.cipherstash/auth.json`. Database-touching commands check for this file before running.
259
259
260
-
### `dbinstall` — Configure the database and install EQL extensions
260
+
### `eqlinstall` — Configure the database and install EQL extensions
261
261
262
262
```bash
263
-
stashdbinstall
264
-
stashdbinstall --supabase
265
-
stashdbinstall --supabase --migration
266
-
stashdbinstall --supabase --direct
267
-
stashdbinstall --drizzle
268
-
stashdbinstall --force
263
+
stasheqlinstall
264
+
stasheqlinstall --supabase
265
+
stasheqlinstall --supabase --migration
266
+
stasheqlinstall --supabase --direct
267
+
stasheqlinstall --drizzle
268
+
stasheqlinstall --force
269
269
```
270
270
271
-
`stashinit` runs `dbinstall`automatically as part of its EQL install phase. Run `dbinstall` directly when you skipped init, when you need flags init doesn't expose (`--migration`, `--migrations-dir`, `--exclude-operator-family`), or when re-installing/upgrading EQL on its own.
271
+
`stashdbinstall`is a deprecated alias for this command — it still works but prints a deprecation warning. Always use `eqlinstall` in new instructions.
272
272
273
-
`dbinstall` is the single command that gets a project from zero to installed EQL:
273
+
`stashinit` runs `eqlinstall` automatically as part of its EQL install phase. Run `eqlinstall` directly when you skipped init, when you need flags init doesn't expose (`--migration`, `--migrations-dir`, `--exclude-operator-family`), or when re-installing/upgrading EQL on its own.
274
+
275
+
`eqlinstall` is the single command that gets a project from zero to installed EQL:
274
276
275
277
1. Scaffolds `stash.config.ts` if missing (auto-detects an existing client file at common locations, otherwise prompts).
276
278
2. Loads the config.
@@ -295,10 +297,13 @@ stash db install --force
295
297
| `--migration` | Write the EQL SQL into a Supabase migration file (requires `--supabase`) |
296
298
| `--direct` | Run the EQL SQL directly against the database (requires `--supabase`; mutually exclusive with `--migration`) |
| `--eql-version <2\|3>` | EQL generation to install (default: `2`). `3` installs the native concrete-domain schema (`public.*` type domains, `eql_v3` operators, `eql_v3_internal` constructors) |
298
301
299
302
`--migration`, `--direct`, and `--migrations-dir` only make sense in the Supabase flow and require `--supabase` to be passed explicitly. They never auto-enable `--supabase`.
300
303
301
-
#### `dbinstall --drizzle`
304
+
`--eql-version3` currently installs via the direct path only — it rejects `--drizzle`, `--migration`, `--migrations-dir`, and `--latest`. Bundles are vendored (no public v3 release artifacts yet), so `--latest` is v2-only.
305
+
306
+
#### `eqlinstall --drizzle`
302
307
303
308
When `--drizzle` is passed, the CLI:
304
309
1. Runs `drizzle-kitgenerate --custom --name=<name>` to scaffold an empty migration.
@@ -307,7 +312,7 @@ When `--drizzle` is passed, the CLI:
307
312
308
313
You then run `npxdrizzle-kitmigrate` to apply it. Requires `drizzle-kit` as a dev dependency.
309
314
310
-
#### `dbinstall --supabase --migration`
315
+
#### `eqlinstall --supabase --migration`
311
316
312
317
Writes the EQL SQL to `supabase/migrations/00000000000000_cipherstash_eql.sql`. The all-zero timestamp ensures this migration runs before any user migrations that reference `eql_v2_encrypted`. Run `supabasedbreset` (local) or `supabasemigrationup` (remote) to apply it.
313
318
@@ -331,7 +336,7 @@ stash db upgrade --latest
331
336
| `--exclude-operator-family` | Skip operator family creation |
332
337
| `--latest` | Fetch latest EQL from GitHub instead of bundled |
333
338
334
-
The EQL install SQL is idempotent and safe to re-run. The command checks the current version, re-runs the install SQL, then reports the new version. If EQL is not installed, it suggests running `dbinstall` instead.
339
+
The EQL install SQL is idempotent and safe to re-run. The command checks the current version, re-runs the install SQL, then reports the new version. If EQL is not installed, it suggests running `eqlinstall` instead.
335
340
336
341
### `dbvalidate` — Validate encryption schema
337
342
@@ -437,7 +442,7 @@ Reports:
437
442
stashdbtest-connection
438
443
```
439
444
440
-
Verifies the database URL in your config is valid and the database is reachable. Reports the database name, connected role, and PostgreSQL server version. Useful for debugging connection issues before running `dbinstall`.
445
+
Verifies the database URL in your config is valid and the database is reachable. Reports the database name, connected role, and PostgreSQL server version. Useful for debugging connection issues before running `eqlinstall`.
441
446
442
447
### `dbmigrate` — Run pending encrypt config migrations
443
448
@@ -451,7 +456,7 @@ Not yet implemented — placeholder for future encrypt-config migration tooling.
451
456
452
457
The `encrypt` group is the cutover-step toolset: it runs the database-side work that takes an existing plaintext column the rest of the way to encrypted, after the encryption-rollout PR is deployed and dual-writes are live in production. The internal event log uses `schema-added → dual-writing → backfilling → backfilled → cut-over → dropped` as machine-readable phase names; the user-facing story is the rollout/cutover model documented in the `stash-encryption` skill.
453
458
454
-
It drives the `@cipherstash/migrate` library, which records every transition in a `cipherstash.cs_migrations` table (installed by `stashdbinstall`) and reads the user's intent from `.cipherstash/migrations.json`. This section documents the CLI surface.
459
+
It drives the `@cipherstash/migrate` library, which records every transition in a `cipherstash.cs_migrations` table (installed by `stasheqlinstall`) and reads the user's intent from `.cipherstash/migrations.json`. This section documents the CLI surface.
455
460
456
461
The examples below show the bare `stash` form, which works after `stashinit` adds the CLI as a project dev dep. See the "CLI Usage" section above for how to invoke it through your package manager before that.
457
462
@@ -639,7 +644,7 @@ if (await installer.isInstalled()) {
639
644
640
645
- Node.js >= 22
641
646
- PostgreSQL database with sufficient permissions (see `checkPermissions()`)
642
-
- A `stash.config.ts` file with a valid `databaseUrl` (or run `stash init` / `stash db install` to scaffold it)
647
+
- A `stash.config.ts` file with a valid `databaseUrl` (or run `stash init` / `stash eql install` to scaffold it)
643
648
- Peer dependency: `@cipherstash/stack` >= 0.6.0
644
649
645
650
## Common issues
@@ -650,7 +655,7 @@ The database role needs `CREATE` privileges on the database and public schema, o
650
655
651
656
### Config not found
652
657
653
-
`stash.config.ts` must be in the project root or a parent directory. The file must `export default defineConfig(...)`. The fastest fix is `stash init`, which scaffolds the config (and authenticates, installs deps, installs EQL, and writes `.cipherstash/context.json` in the same run). For a CLI-only setup, `stash db install` also scaffolds the config.
658
+
`stash.config.ts` must be in the project root or a parent directory. The file must `export default defineConfig(...)`. The fastest fix is `stash init`, which scaffolds the config (and authenticates, installs deps, installs EQL, and writes `.cipherstash/context.json` in the same run). For a CLI-only setup, `stash eql install` also scaffolds the config.
0 commit comments