@cipherstash/stack 0.8.0 → 0.9.0
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/CHANGELOG.md +6 -0
- package/README.md +25 -3
- package/dist/bin/stash.js +405 -201
- package/dist/bin/stash.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -85,7 +85,7 @@ if (decrypted.failure) {
|
|
|
85
85
|
- **Bulk operations** - Encrypt or decrypt thousands of values in a single ZeroKMS call (`bulkEncrypt`, `bulkDecrypt`, `bulkEncryptModels`, `bulkDecryptModels`).
|
|
86
86
|
- **Identity-aware encryption** - Tie encryption to a user's JWT via `LockContext`, so only that user can decrypt.
|
|
87
87
|
- **Secrets management** - Store, retrieve, list, and delete encrypted secrets with the `Secrets` class.
|
|
88
|
-
- **CLI (`stash`)** -
|
|
88
|
+
- **CLI (`stash`)** - Initialize projects, manage secrets, and set up encryption from the terminal.
|
|
89
89
|
- **TypeScript-first** - Strongly typed schemas, results, and model operations with full generics support.
|
|
90
90
|
|
|
91
91
|
## Schema Definition
|
|
@@ -430,6 +430,30 @@ await secrets.delete("DATABASE_URL")
|
|
|
430
430
|
|
|
431
431
|
The `stash` CLI is bundled with the package and available after install.
|
|
432
432
|
|
|
433
|
+
### `stash init`
|
|
434
|
+
|
|
435
|
+
Initialize CipherStash for your project with an interactive wizard.
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
npx stash init
|
|
439
|
+
npx stash init --supabase
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
The wizard will:
|
|
443
|
+
1. Choose your database connection method (Drizzle ORM, Supabase JS, Prisma, or Raw SQL)
|
|
444
|
+
2. Build an encryption schema interactively or use a placeholder, then generate the encryption client file
|
|
445
|
+
3. Install `@cipherstash/stack-forge` as a dev dependency for database tooling
|
|
446
|
+
|
|
447
|
+
After `stash init`, create a CipherStash account at [dashboard.cipherstash.com/sign-up](https://dashboard.cipherstash.com/sign-up) to get your credentials, then run `npx stash-forge setup` to configure your database connection.
|
|
448
|
+
|
|
449
|
+
| Flag | Description |
|
|
450
|
+
|------|-------------|
|
|
451
|
+
| `--supabase` | Use Supabase-specific setup flow |
|
|
452
|
+
|
|
453
|
+
### `stash secrets`
|
|
454
|
+
|
|
455
|
+
Manage encrypted secrets from the terminal.
|
|
456
|
+
|
|
433
457
|
```bash
|
|
434
458
|
npx stash secrets set -name DATABASE_URL -value "postgres://..." -environment production
|
|
435
459
|
npx stash secrets get -name DATABASE_URL -environment production
|
|
@@ -437,8 +461,6 @@ npx stash secrets list -environment production
|
|
|
437
461
|
npx stash secrets delete -name DATABASE_URL -environment production
|
|
438
462
|
```
|
|
439
463
|
|
|
440
|
-
### Commands
|
|
441
|
-
|
|
442
464
|
| Command | Flags | Aliases | Description |
|
|
443
465
|
|-----|----|-----|-------|
|
|
444
466
|
| `stash secrets set` | `-name`, `-value`, `-environment` | `-n`, `-V`, `-e` | Encrypt and store a secret |
|