keypin 0.11.0 → 0.13.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 +13 -10
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -64,28 +64,31 @@ It never changes the file: it tells you which lines to remove. See
64
64
 
65
65
  ### Production keys
66
66
 
67
- For each secret a workflow or Worker needs, `keypin check` prints the TOML to add:
67
+ Put each prod value in 1Password first:
68
68
 
69
- ```toml
70
- [keys.STRIPE_KEY]
71
- 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`.
72
73
 
73
- [keys.STRIPE_KEY.prod]
74
- from = "op://<vault>/<item>/<field>"
74
+ Then `keypin check` prints the TOML to add for each secret a workflow or Worker needs:
75
75
 
76
+ ```toml
76
77
  [[keys.STRIPE_KEY.prod.publish]]
77
78
  to = "github-actions"
78
79
  repo = "me/my-project"
79
80
  ```
80
81
 
81
- Paste it into `keypin.toml` and replace each `<...>`. For `from`, open the field's menu in 1Password and select
82
- **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:
83
86
 
84
87
  ```sh
85
88
  keypin publish --all
86
89
  ```
87
90
 
88
- `publish` shows what it will write where and waits for you to type `yes`. See
91
+ `publish` shows what it will write where and waits for you to answer `y`. See
89
92
  [Publishing](https://github.com/caiopizzol/keypin/blob/main/docs/publishing.md).
90
93
 
91
94
  ## Commands
@@ -95,7 +98,7 @@ keypin init [folder] # write keypin.toml and register the pr
95
98
  keypin check [folder] # report one project; writes nothing
96
99
  keypin import <env-file> [NAME...] [--env <name>] --vault <vault>
97
100
  # move an env file's values into 1Password and map them
98
- 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
99
102
  keypin publish <VARIABLE> | --all # write prod keys to their destinations
100
103
  keypin status # every project's keys, and when each is due for rotation
101
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.11.0",
3
+ "version": "0.13.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.11.0",
30
- "@keypin/cli-darwin-x64": "0.11.0",
31
- "@keypin/cli-linux-x64": "0.11.0",
32
- "@keypin/cli-linux-arm64": "0.11.0"
29
+ "@keypin/cli-darwin-arm64": "0.13.0",
30
+ "@keypin/cli-darwin-x64": "0.13.0",
31
+ "@keypin/cli-linux-x64": "0.13.0",
32
+ "@keypin/cli-linux-arm64": "0.13.0"
33
33
  }
34
34
  }