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/stack-forge/README.md
+34-22Lines changed: 34 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,25 +30,27 @@ bun add -D @cipherstash/stack-forge
30
30
31
31
## Quick Start
32
32
33
-
The fastest way to get started is with the interactive `init` command:
33
+
First, initialize your project with the `stash` CLI (from `@cipherstash/stack`):
34
34
35
35
```bash
36
-
npx stash-forge init
36
+
npx stash init
37
37
```
38
38
39
-
This will:
40
-
1. Check if `@cipherstash/stack` is installed and offer to install it
41
-
2. Ask for your database URL
42
-
3. Ask which integration you're using (Drizzle, Supabase, or plain PostgreSQL)
43
-
4. Let you build an encryption schema interactively or use a placeholder
44
-
5. Generate `stash.config.ts` and your encryption client file
39
+
This generates your encryption schema and installs `@cipherstash/stack-forge` as a dev dependency.
45
40
46
-
Then install EQL in your database:
41
+
Then set up your database and install EQL:
47
42
48
43
```bash
49
-
npx stash-forge install
44
+
npx stash-forge setup
50
45
```
51
46
47
+
This will:
48
+
1. Auto-detect your encryption client file (or ask for the path)
49
+
2. Ask for your database URL
50
+
3. Generate `stash.config.ts`
51
+
4. Ask which Postgres provider you're using (Supabase, Neon, AWS RDS, etc.) to determine the right install flags
52
+
5. Install EQL extensions in your database
53
+
52
54
That's it. EQL is now installed and your encryption schema is ready.
53
55
54
56
### Manual setup
@@ -64,6 +66,7 @@ import { defineConfig } from '@cipherstash/stack-forge'
64
66
65
67
exportdefaultdefineConfig({
66
68
databaseUrl: process.env.DATABASE_URL!,
69
+
client: './src/encryption/index.ts',
67
70
})
68
71
```
69
72
@@ -117,25 +120,34 @@ The config file is resolved by walking up from the current working directory, si
117
120
stash-forge <command> [options]
118
121
```
119
122
120
-
### `init`
123
+
### `setup`
121
124
122
-
Initialize CipherStash Forge in your project with an interactive wizard.
125
+
Configure your database and install EQL extensions. Run this after `stash init` has set up your encryption schema.
123
126
124
127
```bash
125
-
npx stash-forge init
128
+
npx stash-forge setup [options]
126
129
```
127
130
128
131
The wizard will:
129
-
-Check if `@cipherstash/stack` is installed and prompt to install it (detects your package manager automatically)
132
+
-Auto-detect your encryption client file by scanning common locations (`./src/encryption/index.ts`, etc.), then confirm with you or ask for the path if not found
130
133
- Ask for your database URL (pre-fills from `DATABASE_URL` env var)
131
-
- Ask which integration you're using (Drizzle ORM, Supabase, or plain PostgreSQL)
132
-
- Ask where to create the encryption client file
133
-
- If the client file already exists, ask whether to keep it or overwrite
134
-
- Let you choose between building a schema interactively or using a placeholder:
135
-
-**Build a schema:** asks for table name, column names, data types, and search operations for each column
136
-
-**Placeholder:** generates an example `users` table with `email` and `name` columns
137
-
- Generate `stash.config.ts` and the encryption client file
138
-
- Print next steps with links to the [CipherStash dashboard](https://dashboard.cipherstash.com/sign-in) for credentials
134
+
- Generate `stash.config.ts` with the database URL and client path
135
+
- Ask which Postgres provider you're using to determine the right install flags:
136
+
-**Supabase** — uses `--supabase` (no operator families + Supabase role grants)
0 commit comments