@secretstash/cli 0.1.5 → 0.1.9
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/README.md +68 -17
- package/dist/index.js +465 -181
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -32,13 +32,38 @@ brew install secretstash/tap/sstash
|
|
|
32
32
|
|
|
33
33
|
### Authentication
|
|
34
34
|
|
|
35
|
+
The CLI uses browser-based authentication by default, supporting passkeys, OAuth (GitHub/Google), and 2FA:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Login via browser (opens browser window)
|
|
39
|
+
sstash login
|
|
40
|
+
|
|
41
|
+
# This will:
|
|
42
|
+
# 1. Generate a session code
|
|
43
|
+
# 2. Open your default browser to complete authentication
|
|
44
|
+
# 3. Wait for you to sign in (passkey, OAuth, or email/password)
|
|
45
|
+
# 4. Automatically complete CLI authentication
|
|
46
|
+
|
|
47
|
+
# Check who you're logged in as
|
|
48
|
+
sstash whoami
|
|
49
|
+
|
|
50
|
+
# Logout
|
|
51
|
+
sstash logout
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Service Token Authentication (CI/CD)
|
|
55
|
+
|
|
56
|
+
For automated workflows, use service tokens instead of browser authentication:
|
|
57
|
+
|
|
35
58
|
```bash
|
|
36
|
-
#
|
|
37
|
-
|
|
59
|
+
# Set service token as environment variable
|
|
60
|
+
export SECRETSTASH_TOKEN=stk_your-service-token
|
|
61
|
+
|
|
62
|
+
# Or login with token directly
|
|
63
|
+
sstash login --token stk_your-service-token
|
|
38
64
|
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
sstash auth status
|
|
65
|
+
# Verify token works
|
|
66
|
+
sstash teams
|
|
42
67
|
```
|
|
43
68
|
|
|
44
69
|
### Working with Secrets
|
|
@@ -285,25 +310,51 @@ For CI/CD and automated workflows, use service tokens instead of user credential
|
|
|
285
310
|
|
|
286
311
|
## Commands Reference
|
|
287
312
|
|
|
313
|
+
### Authentication
|
|
314
|
+
| Command | Description |
|
|
315
|
+
|---------|-------------|
|
|
316
|
+
| `sstash login` | Authenticate via browser (passkeys, OAuth, 2FA) |
|
|
317
|
+
| `sstash login --token <token>` | Authenticate with service token |
|
|
318
|
+
| `sstash logout` | Clear authentication |
|
|
319
|
+
| `sstash whoami` | Show current user/token info |
|
|
320
|
+
| `sstash 2fa setup` | Set up two-factor authentication |
|
|
321
|
+
| `sstash register` | Create a new SecretStash account |
|
|
322
|
+
|
|
323
|
+
### Secrets
|
|
288
324
|
| Command | Description |
|
|
289
325
|
|---------|-------------|
|
|
290
|
-
| `sstash auth login` | Authenticate with SecretStash |
|
|
291
|
-
| `sstash auth logout` | Clear authentication |
|
|
292
|
-
| `sstash auth status` | Show authentication status |
|
|
293
326
|
| `sstash pull` | Pull secrets from SecretStash |
|
|
294
327
|
| `sstash push` | Push secrets to SecretStash |
|
|
295
|
-
| `sstash list` | List secrets in an environment |
|
|
296
|
-
| `sstash get <key>` | Get a specific secret |
|
|
297
|
-
| `sstash set <key>=<value>` | Set a specific secret |
|
|
298
|
-
| `sstash delete <key>` | Delete a specific secret |
|
|
328
|
+
| `sstash secrets list` | List secrets in an environment |
|
|
329
|
+
| `sstash secrets get <key>` | Get a specific secret |
|
|
330
|
+
| `sstash secrets set <key>=<value>` | Set a specific secret |
|
|
331
|
+
| `sstash secrets delete <key>` | Delete a specific secret |
|
|
332
|
+
| `sstash secrets history <key>` | View version history for a secret |
|
|
333
|
+
| `sstash secrets rollback <key>` | Rollback to a previous version |
|
|
334
|
+
| `sstash secrets tag <key> <tag>` | Add a tag to a secret |
|
|
335
|
+
| `sstash secrets untag <key> <tag>` | Remove a tag from a secret |
|
|
336
|
+
| `sstash secrets expiring` | List secrets expiring soon |
|
|
299
337
|
| `sstash run` | Run a command with secrets injected |
|
|
300
338
|
| `sstash diff` | Compare local and remote secrets |
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
|
339
|
+
|
|
340
|
+
### Organization
|
|
341
|
+
| Command | Description |
|
|
342
|
+
|---------|-------------|
|
|
343
|
+
| `sstash teams` | List teams |
|
|
344
|
+
| `sstash teams use <slug>` | Switch team context |
|
|
345
|
+
| `sstash projects` | List projects in current team |
|
|
346
|
+
| `sstash projects use <slug>` | Switch project context |
|
|
347
|
+
| `sstash environments` | List environments in current project |
|
|
304
348
|
| `sstash environments create <name>` | Create a new environment |
|
|
305
|
-
|
|
306
|
-
|
|
349
|
+
|
|
350
|
+
### Tags & Shares
|
|
351
|
+
| Command | Description |
|
|
352
|
+
|---------|-------------|
|
|
353
|
+
| `sstash tags` | List tags in current team |
|
|
354
|
+
| `sstash tags create <name>` | Create a new tag |
|
|
355
|
+
| `sstash share create <key>` | Create a share link for a secret |
|
|
356
|
+
| `sstash share list` | List active share links |
|
|
357
|
+
| `sstash share revoke <id>` | Revoke a share link |
|
|
307
358
|
|
|
308
359
|
Use `sstash --help` or `sstash <command> --help` for detailed usage information.
|
|
309
360
|
|