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
Copy file name to clipboardExpand all lines: packages/cli/CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# @cipherstash/cli
2
2
3
-
> Renamed from `@cipherstash/stack-forge`. The standalone `@cipherstash/wizard` package was absorbed into this CLI as `stash wizard`. The single binary is now `stash` (replaces `stash-forge` and `cipherstash-wizard`).
3
+
> Renamed from `@cipherstash/stack-forge`. The standalone `@cipherstash/wizard` package was absorbed into this CLI as `npx @cipherstash/cli wizard`. The single binary is now invoked via `npx @cipherstash/cli` (replaces `stash-forge` and `cipherstash-wizard`).
Copy file name to clipboardExpand all lines: packages/cli/README.md
+48-48Lines changed: 48 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,10 +11,10 @@ The single CLI for CipherStash. It handles authentication, project initializatio
11
11
12
12
```bash
13
13
npm install -D @cipherstash/cli
14
-
npx stash auth login # authenticate with CipherStash
15
-
npx stash init # scaffold encryption schema and stash.config.ts
16
-
npx stash db setup # connect to your database and install EQL
17
-
npx stash wizard # AI agent wires encryption into your codebase
14
+
npx @cipherstash/cli auth login # authenticate with CipherStash
15
+
npx @cipherstash/cli init # scaffold encryption schema and stash.config.ts
16
+
npx @cipherstash/cli db setup # connect to your database and install EQL
17
+
npx @cipherstash/cli wizard # AI agent wires encryption into your codebase
18
18
```
19
19
20
20
What each step does:
@@ -29,14 +29,14 @@ What each step does:
29
29
## Recommended flow
30
30
31
31
```
32
-
stash init
33
-
└── stash db setup
34
-
└── stash wizard ← fast path: AI edits your files
32
+
npx @cipherstash/cli init
33
+
└── npx @cipherstash/cli db setup
34
+
└── npx @cipherstash/cli wizard ← fast path: AI edits your files
35
35
OR
36
36
Edit schema files by hand ← escape hatch
37
37
```
38
38
39
-
`stash wizard` is the recommended path after `db setup`. It detects your framework (Drizzle, Supabase, Prisma, raw SQL), introspects your database, and integrates encryption directly into your existing schema definitions. If you prefer to write the schema by hand, skip the wizard and edit your encryption client file directly.
39
+
`npx @cipherstash/cli wizard` is the recommended path after `db setup`. It detects your framework (Drizzle, Supabase, Prisma, raw SQL), introspects your database, and integrates encryption directly into your existing schema definitions. If you prefer to write the schema by hand, skip the wizard and edit your encryption client file directly.
Scaffold CipherStash for your project. Generates an encryption client file, writes initial schema code, and installs `@cipherstash/cli` as a dev dependency.
|`--supabase`| Use the Supabase-specific setup flow |
80
80
|`--drizzle`| Use the Drizzle-specific setup flow |
81
81
82
-
After `init` completes, the Next Steps output tells you to run `stash db setup`, then either `stash wizard` or edit the schema manually.
82
+
After `init` completes, the Next Steps output tells you to run `npx @cipherstash/cli db setup`, then either `npx @cipherstash/cli wizard` or edit the schema manually.
83
83
84
84
---
85
85
86
-
### `stash auth login`
86
+
### `npx @cipherstash/cli auth login`
87
87
88
88
Authenticate with CipherStash using a browser-based device code flow.
89
89
90
90
```bash
91
-
npx stash auth login
91
+
npx @cipherstash/cli auth login
92
92
```
93
93
94
94
Saves the token to `~/.cipherstash/auth.json`. The wizard checks for this file as a prerequisite before running.
95
95
96
96
---
97
97
98
-
### `stash wizard`
98
+
### `npx @cipherstash/cli wizard`
99
99
100
100
AI-powered encryption setup. The wizard reads your codebase, detects your framework, introspects your database schema, and edits your existing schema files to add encrypted column definitions.
101
101
102
102
```bash
103
-
npx stash wizard
103
+
npx @cipherstash/cli wizard
104
104
```
105
105
106
106
Prerequisites:
107
-
- Authenticated (`stash auth login` completed).
108
-
-`stash.config.ts` present (run `stash db setup` first).
npx stash secrets set -n DATABASE_URL -V "postgres://..." -e production
145
-
npx stash secrets get -n DATABASE_URL -e production
146
-
npx stash secrets get-many -n DATABASE_URL,API_KEY -e production
147
-
npx stash secrets list -e production
148
-
npx stash secrets delete -n DATABASE_URL -e production -y
144
+
npx @cipherstash/cli secrets set -n DATABASE_URL -V "postgres://..." -e production
145
+
npx @cipherstash/cli secrets get -n DATABASE_URL -e production
146
+
npx @cipherstash/cli secrets get-many -n DATABASE_URL,API_KEY -e production
147
+
npx @cipherstash/cli secrets list -e production
148
+
npx @cipherstash/cli secrets delete -n DATABASE_URL -e production -y
149
149
```
150
150
151
151
---
152
152
153
-
### `stash db setup`
153
+
### `npx @cipherstash/cli db setup`
154
154
155
-
Configure your database and install EQL extensions. Run this after `stash init`.
155
+
Configure your database and install EQL extensions. Run this after `npx @cipherstash/cli init`.
156
156
157
157
```bash
158
-
npx stash db setup [options]
158
+
npx @cipherstash/cli db setup [options]
159
159
```
160
160
161
161
The interactive wizard:
@@ -178,12 +178,12 @@ The interactive wizard:
178
178
179
179
---
180
180
181
-
### `stash db install`
181
+
### `npx @cipherstash/cli db install`
182
182
183
183
Install CipherStash EQL extensions into your database. Uses bundled SQL by default for offline, deterministic installs.
184
184
185
185
```bash
186
-
npx stash db install [options]
186
+
npx @cipherstash/cli db install [options]
187
187
```
188
188
189
189
| Flag | Description |
@@ -203,12 +203,12 @@ The `--supabase` flag uses a Supabase-specific SQL variant and grants `USAGE`, t
203
203
204
204
---
205
205
206
-
### `stash db upgrade`
206
+
### `npx @cipherstash/cli db upgrade`
207
207
208
208
Upgrade an existing EQL installation to the version bundled with the package (or the latest from GitHub).
209
209
210
210
```bash
211
-
npx stash db upgrade [options]
211
+
npx @cipherstash/cli db upgrade [options]
212
212
```
213
213
214
214
| Flag | Description |
@@ -218,16 +218,16 @@ npx stash db upgrade [options]
218
218
|`--exclude-operator-family`| Skip operator family creation |
219
219
|`--latest`| Fetch the latest EQL from GitHub |
220
220
221
-
The install SQL is idempotent and safe to re-run. If EQL is not installed, the command suggests running `stash db install` instead.
221
+
The install SQL is idempotent and safe to re-run. If EQL is not installed, the command suggests running `npx @cipherstash/cli db install` instead.
222
222
223
223
---
224
224
225
-
### `stash db push`
225
+
### `npx @cipherstash/cli db push`
226
226
227
227
Push your encryption schema to the database. **Only required when using CipherStash Proxy.** If you use the SDK directly with Drizzle, Supabase, or plain PostgreSQL, skip this step.
228
228
229
229
```bash
230
-
npx stash db push [--dry-run]
230
+
npx @cipherstash/cli db push [--dry-run]
231
231
```
232
232
233
233
| Flag | Description |
@@ -249,12 +249,12 @@ When pushing, the CLI loads the encryption client from `stash.config.ts`, runs s
249
249
250
250
---
251
251
252
-
### `stash db validate`
252
+
### `npx @cipherstash/cli db validate`
253
253
254
254
Validate your encryption schema for common misconfigurations.
255
255
256
256
```bash
257
-
npx stash db validate [--supabase] [--exclude-operator-family]
257
+
npx @cipherstash/cli db validate [--supabase] [--exclude-operator-family]
258
258
```
259
259
260
260
| Rule | Severity |
@@ -268,62 +268,62 @@ The command exits with code 1 on errors (not on warnings or info). Validation al
268
268
269
269
---
270
270
271
-
### `stash db migrate`
271
+
### `npx @cipherstash/cli db migrate`
272
272
273
273
Run pending encrypt config migrations.
274
274
275
275
```bash
276
-
npx stash db migrate
276
+
npx @cipherstash/cli db migrate
277
277
```
278
278
279
279
> **Good to know:** This command is not yet implemented.
280
280
281
281
---
282
282
283
-
### `stash db status`
283
+
### `npx @cipherstash/cli db status`
284
284
285
285
Show the current state of EQL in your database.
286
286
287
287
```bash
288
-
npx stash db status
288
+
npx @cipherstash/cli db status
289
289
```
290
290
291
291
Reports EQL installation status and version, database permission status, and whether an active encrypt config exists in `eql_v2_configuration` (relevant only for CipherStash Proxy).
292
292
293
293
---
294
294
295
-
### `stash db test-connection`
295
+
### `npx @cipherstash/cli db test-connection`
296
296
297
297
Verify that the database URL in your config is valid and the database is reachable.
298
298
299
299
```bash
300
-
npx stash db test-connection
300
+
npx @cipherstash/cli db test-connection
301
301
```
302
302
303
303
Reports the database name, connected role, and PostgreSQL server version.
304
304
305
305
---
306
306
307
-
### `stash schema build`
307
+
### `npx @cipherstash/cli schema build`
308
308
309
309
Build an encryption client file from your database schema using DB introspection.
310
310
311
311
```bash
312
-
npx stash schema build [--supabase]
312
+
npx @cipherstash/cli schema build [--supabase]
313
313
```
314
314
315
-
The first prompt offers `stash wizard` as the recommended path. If you choose the manual builder, the command connects to your database, lets you select tables and columns to encrypt, asks about searchable indexes, and generates a typed encryption client file.
315
+
The first prompt offers `npx @cipherstash/cli wizard` as the recommended path. If you choose the manual builder, the command connects to your database, lets you select tables and columns to encrypt, asks about searchable indexes, and generates a typed encryption client file.
316
316
317
317
Reads `databaseUrl` from `stash.config.ts`.
318
318
319
319
---
320
320
321
321
## Drizzle migration mode
322
322
323
-
Use `--drizzle` with `stash db install` (or `stash db setup`) to add EQL installation to your Drizzle migration history instead of applying it directly.
323
+
Use `--drizzle` with `npx @cipherstash/cli db install` (or `npx @cipherstash/cli db setup`) to add EQL installation to your Drizzle migration history instead of applying it directly.
324
324
325
325
```bash
326
-
npx stash db install --drizzle
326
+
npx @cipherstash/cli db install --drizzle
327
327
npx drizzle-kit migrate
328
328
```
329
329
@@ -335,7 +335,7 @@ How it works:
335
335
With a custom name or output directory:
336
336
337
337
```bash
338
-
npx stash db install --drizzle --name setup-eql --out ./migrations
338
+
npx @cipherstash/cli db install --drizzle --name setup-eql --out ./migrations
'This command pushes the encryption schema to the database for use with CipherStash Proxy.\nIf you are using the SDK directly (Drizzle, Supabase, or plain PostgreSQL), this step is not required.',
0 commit comments