keypin 0.10.0 → 0.12.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.
Files changed (2) hide show
  1. package/README.md +15 -10
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -47,6 +47,8 @@ keypin init # write keypin.toml
47
47
  keypin check # what the project uses, what's missing, and what to run or add
48
48
  ```
49
49
 
50
+ `check` starts with the logins and apps you still need to set up, if any.
51
+
50
52
  ### Local keys
51
53
 
52
54
  Move the secrets from your `.env` into 1Password, then run your app with them:
@@ -62,22 +64,25 @@ It never changes the file: it tells you which lines to remove. See
62
64
 
63
65
  ### Production keys
64
66
 
65
- For each secret a workflow or Worker needs, `keypin check` prints the TOML to add:
67
+ Put each prod value in 1Password first:
66
68
 
67
- ```toml
68
- [keys.STRIPE_KEY]
69
- rotate_every = "90d"
69
+ - **In a file:** `keypin import .env.production STRIPE_KEY --env prod --vault Private`
70
+ - **Only in GitHub or Cloudflare:** neither keypin nor you can read it back, so make a new key at the provider.
71
+
72
+ For staging, add it to `environments` first (`check` prints the line), then import with `--env staging`.
70
73
 
71
- [keys.STRIPE_KEY.prod]
72
- from = "op://<vault>/<item>/<field>"
74
+ Then `keypin check` prints the TOML to add for each secret a workflow or Worker needs:
73
75
 
76
+ ```toml
74
77
  [[keys.STRIPE_KEY.prod.publish]]
75
78
  to = "github-actions"
76
79
  repo = "me/my-project"
77
80
  ```
78
81
 
79
- Paste it into `keypin.toml` and replace each `<...>`. For `from`, open the field's menu in 1Password and select
80
- **Copy Secret Reference**. Then publish:
82
+ Paste it into `keypin.toml` and replace each `<...>`. For a key you didn't import, `from` takes its reference: in
83
+ 1Password, open the field's menu and select **Copy Secret Reference**.
84
+
85
+ Then publish:
81
86
 
82
87
  ```sh
83
88
  keypin publish --all
@@ -91,9 +96,9 @@ keypin publish --all
91
96
  ```sh
92
97
  keypin init [folder] # write keypin.toml and register the project
93
98
  keypin check [folder] # report one project; writes nothing
94
- keypin import <env-file> [NAME...] --vault <vault>
99
+ keypin import <env-file> [NAME...] [--env <name>] --vault <vault>
95
100
  # move an env file's values into 1Password and map them
96
- keypin run -- <command> # run a command with the dev keys
101
+ keypin run [--only NAME] -- <command> # run a command with the dev keys, or only the named ones
97
102
  keypin publish <VARIABLE> | --all # write prod keys to their destinations
98
103
  keypin status # every project's keys, and when each is due for rotation
99
104
  keypin unregister [folder] # stop listing a project
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keypin",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/caiopizzol/keypin#readme",
6
6
  "bugs": {
@@ -26,9 +26,9 @@
26
26
  "x64"
27
27
  ],
28
28
  "optionalDependencies": {
29
- "@keypin/cli-darwin-arm64": "0.10.0",
30
- "@keypin/cli-darwin-x64": "0.10.0",
31
- "@keypin/cli-linux-x64": "0.10.0",
32
- "@keypin/cli-linux-arm64": "0.10.0"
29
+ "@keypin/cli-darwin-arm64": "0.12.0",
30
+ "@keypin/cli-darwin-x64": "0.12.0",
31
+ "@keypin/cli-linux-x64": "0.12.0",
32
+ "@keypin/cli-linux-arm64": "0.12.0"
33
33
  }
34
34
  }