@catladder/cli 0.0.0-next-aea5d3ad → 0.0.0-next-1c65899f
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/dist/bundles/cli/index.js +705 -229
- package/dist/bundles/skills/catladder-cli/references/commands.md +37 -2
- package/dist/bundles/skills/catladder-secrets/SKILL.md +42 -9
- package/dist/cli/src/commands/index.d.ts +4 -0
- package/dist/cli/src/commands/index.js +9 -1
- package/dist/cli/src/commands/index.js.map +1 -1
- package/dist/cli/src/commands/project/commandConfigSecrets.d.ts +6 -1
- package/dist/cli/src/commands/project/commandConfigSecrets.js +56 -15
- package/dist/cli/src/commands/project/commandConfigSecrets.js.map +1 -1
- package/dist/cli/src/commands/project/secrets/commandSecretsList.d.ts +24 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsList.js +64 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsList.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPull.d.ts +19 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPull.js +48 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPull.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPush.d.ts +19 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPush.js +74 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPush.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsSet.d.ts +24 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsSet.js +82 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsSet.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/document.d.ts +47 -0
- package/dist/cli/src/commands/project/secrets/document.js +180 -0
- package/dist/cli/src/commands/project/secrets/document.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/parseKeysInput.d.ts +2 -0
- package/dist/cli/src/commands/project/secrets/parseKeysInput.js +10 -0
- package/dist/cli/src/commands/project/secrets/parseKeysInput.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/scope.d.ts +35 -0
- package/dist/cli/src/commands/project/secrets/scope.js +113 -0
- package/dist/cli/src/commands/project/secrets/scope.js.map +1 -0
- package/dist/cli/src/utils/readStdin.d.ts +2 -0
- package/dist/cli/src/utils/readStdin.js +13 -0
- package/dist/cli/src/utils/readStdin.js.map +1 -0
- package/dist/skills/catladder-cli/references/commands.md +37 -2
- package/dist/skills/catladder-secrets/SKILL.md +42 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/commands/index.ts +4 -0
- package/src/commands/project/commandConfigSecrets.ts +76 -15
- package/src/commands/project/secrets/__tests__/document.test.ts +122 -0
- package/src/commands/project/secrets/commandSecretsList.ts +75 -0
- package/src/commands/project/secrets/commandSecretsPull.ts +55 -0
- package/src/commands/project/secrets/commandSecretsPush.ts +100 -0
- package/src/commands/project/secrets/commandSecretsSet.ts +102 -0
- package/src/commands/project/secrets/document.ts +269 -0
- package/src/commands/project/secrets/parseKeysInput.ts +8 -0
- package/src/commands/project/secrets/scope.ts +151 -0
- package/src/utils/readStdin.ts +8 -0
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +0 -2
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +0 -206
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js.map +0 -1
- package/src/apps/cli/commands/project/commandConfigSecrets.ts +0 -322
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: catladder-secrets
|
|
3
|
-
description: Managing environment variables and secrets in a catladder project. Use when adding or changing env vars in catladder.ts (vars.public / vars.secret), when a secret value must be set or
|
|
3
|
+
description: Managing environment variables and secrets in a catladder project. Use when adding or changing env vars in catladder.ts (vars.public / vars.secret), when a secret value must be set, rotated or checked, when secrets need syncing to GitHub, or when local .env / direnv environment questions come up. Triggers on "env var", "secret", "vars", "catenv", ".env", "config-secrets", "secrets-set", "secrets-list", "rotate a secret", "set a secret".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Env vars and secrets with catladder
|
|
@@ -34,18 +34,51 @@ commit.
|
|
|
34
34
|
## Setting secret values
|
|
35
35
|
|
|
36
36
|
Secret values are managed through the catladder CLI — never by editing
|
|
37
|
-
files in the repo
|
|
37
|
+
files in the repo. All secrets commands accept a **scope**:
|
|
38
|
+
`dev:web` (one env of one component), `dev:` (one env, all
|
|
39
|
+
components), `:web` (all envs of one component), or nothing (everything).
|
|
40
|
+
|
|
41
|
+
Check what is declared and what is still unset (never prints values
|
|
42
|
+
unless `--reveal` is passed):
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
yarn catladder project secrets-list
|
|
46
|
+
yarn catladder project secrets-list --check # non-zero exit when something is unset
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Set a single secret (the usual case — also for rotating one value
|
|
50
|
+
across all envs via the `:component` scope):
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
echo -n "the-value" | yarn catladder project secrets-set dev:web API_KEY
|
|
54
|
+
yarn catladder project secrets-set :web API_KEY --value-file /path/to/value
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Prefer stdin or `--value-file` over `--value` so values stay out of
|
|
58
|
+
shell history. **Never pass a real secret value you found in the
|
|
59
|
+
conversation without the user having provided it for this purpose.**
|
|
60
|
+
|
|
61
|
+
Bulk-edit several secrets as a YAML document
|
|
62
|
+
(`component → env → key: value`):
|
|
38
63
|
|
|
39
64
|
```sh
|
|
40
|
-
yarn catladder project
|
|
65
|
+
yarn catladder project secrets-pull dev: --out /tmp/secrets.yml # unset ones appear as "🚨 FILL ME"
|
|
66
|
+
# edit the file, then:
|
|
67
|
+
yarn catladder project secrets-push dev: --file /tmp/secrets.yml # partial docs are fine
|
|
41
68
|
```
|
|
42
69
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
`secrets-push` skips placeholder/empty values, rejects undeclared
|
|
71
|
+
keys, and may be partial — only the provided keys are written. Both
|
|
72
|
+
support `--key KEY1,KEY2` to narrow further. Delete the temp file
|
|
73
|
+
afterwards; never commit it.
|
|
74
|
+
|
|
75
|
+
Humans may instead use the interactive editor flow
|
|
76
|
+
(`project config-secrets`, opens `$EDITOR`); as an agent, use the
|
|
77
|
+
commands above.
|
|
78
|
+
|
|
79
|
+
All of these write to the secrets vault (the source of truth) and
|
|
80
|
+
automatically mirror to the enabled CI backends — which vault is
|
|
81
|
+
configured makes no difference to the commands.
|
|
49
82
|
|
|
50
83
|
## GitHub pipelines
|
|
51
84
|
|