keypin 0.15.1 → 0.21.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/README.md +22 -22
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -20,27 +20,23 @@ keypin runs your apps with keys from your vault, and keeps one map of every key
|
|
|
20
20
|
paste in a chat, or leave on a laptop.
|
|
21
21
|
|
|
22
22
|
Each project lists its keys in a `keypin.toml`: names, vault items and destinations, never values. keypin runs your
|
|
23
|
-
commands with the dev keys and publishes the prod keys
|
|
24
|
-
|
|
23
|
+
commands with the dev keys and publishes the prod keys. It reads a value only while a command runs.
|
|
24
|
+
|
|
25
|
+
| Vaults | Destinations | Rotation |
|
|
26
|
+
| --------- | ------------------ | -------- |
|
|
27
|
+
| 1Password | GitHub Actions | Resend |
|
|
28
|
+
| Infisical | Cloudflare Workers | Neon |
|
|
29
|
+
|
|
30
|
+
Want another? Vote for it on the [roadmap](https://github.com/caiopizzol/keypin/issues/138).
|
|
25
31
|
|
|
26
32
|
## Install
|
|
27
33
|
|
|
28
|
-
keypin runs on macOS, and on Linux with glibc (not Alpine), on arm64 or x64.
|
|
29
|
-
[1Password](https://1password.com/downloads) desktop app; on a server or in CI without it, use a
|
|
30
|
-
[service account](https://github.com/caiopizzol/keypin/blob/main/docs/service-account.md).
|
|
34
|
+
keypin runs on macOS, and on Linux with glibc (not Alpine), on arm64 or x64.
|
|
31
35
|
|
|
32
36
|
```sh
|
|
33
37
|
npm install -g keypin
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
Don't install with `--omit=optional`: the build for your platform is an optional dependency.
|
|
37
|
-
|
|
38
|
-
In 1Password, open **Settings → Developer** and, under **Integrate with the 1Password SDKs**, select **Integrate
|
|
39
|
-
with other apps**. 1Password then asks you to approve each keypin command.
|
|
40
|
-
|
|
41
|
-
To publish, you also need a [`gh`](https://cli.github.com) login for GitHub, or a
|
|
42
|
-
[`wrangler`](https://developers.cloudflare.com/workers/wrangler/) login for Cloudflare.
|
|
43
|
-
|
|
44
40
|
## Get started
|
|
45
41
|
|
|
46
42
|
```sh
|
|
@@ -60,8 +56,7 @@ keypin import .env STRIPE_KEY DATABASE_URL --vault Private --account my.1passwor
|
|
|
60
56
|
keypin run -- npm run dev
|
|
61
57
|
```
|
|
62
58
|
|
|
63
|
-
`import` creates one item per variable and maps it. Variables you don't name, such as `PORT`, stay in the file.
|
|
64
|
-
It never changes the file: it tells you which lines to remove. See
|
|
59
|
+
`import` creates one item per variable and maps it. Variables you don't name, such as `PORT`, stay in the file. See
|
|
65
60
|
[Import](https://github.com/caiopizzol/keypin/blob/main/docs/import.md).
|
|
66
61
|
|
|
67
62
|
### Production keys
|
|
@@ -71,8 +66,6 @@ Put each prod value in 1Password first:
|
|
|
71
66
|
- **In a file:** `keypin import .env.production STRIPE_KEY --env prod --vault Private`
|
|
72
67
|
- **Only in GitHub or Cloudflare:** neither keypin nor you can read it back, so make a new key at the provider.
|
|
73
68
|
|
|
74
|
-
For staging, add it to `environments` first (`check` prints the line), then import with `--env staging`.
|
|
75
|
-
|
|
76
69
|
Then `keypin check` prints the TOML to add for each secret a workflow or Worker needs:
|
|
77
70
|
|
|
78
71
|
```toml
|
|
@@ -90,8 +83,11 @@ Then publish:
|
|
|
90
83
|
keypin publish --all
|
|
91
84
|
```
|
|
92
85
|
|
|
93
|
-
`publish` shows what it will write where and waits for you to answer `y`.
|
|
94
|
-
|
|
86
|
+
`publish` shows what it will write where and waits for you to answer `y`.
|
|
87
|
+
|
|
88
|
+
To rotate a key, give it an
|
|
89
|
+
[issuer](https://github.com/caiopizzol/keypin/blob/main/docs/configuration.md#rotating-a-key) and run `keypin rotate
|
|
90
|
+
RESEND_API_KEY`. keypin creates the new key, saves and publishes it, and asks before it revokes the old one.
|
|
95
91
|
|
|
96
92
|
## Commands
|
|
97
93
|
|
|
@@ -102,6 +98,7 @@ keypin import <env-file> [NAME...] [--env <name>] --vault <vault>
|
|
|
102
98
|
# move an env file's values into 1Password and map them
|
|
103
99
|
keypin run [--only NAME] -- <command> # run a command with the dev keys, or only the named ones
|
|
104
100
|
keypin publish <VARIABLE> | --all # write prod keys to their destinations
|
|
101
|
+
keypin rotate <VARIABLE> # replace a key at its provider, then publish it
|
|
105
102
|
keypin status # every project's keys, and when each is due for rotation
|
|
106
103
|
keypin unregister [folder] # stop listing a project
|
|
107
104
|
```
|
|
@@ -121,10 +118,13 @@ npx skills add caiopizzol/keypin -g # all your projects
|
|
|
121
118
|
## Docs
|
|
122
119
|
|
|
123
120
|
- [Configuration](https://github.com/caiopizzol/keypin/blob/main/docs/configuration.md): every field in
|
|
124
|
-
`keypin.toml
|
|
121
|
+
`keypin.toml`
|
|
125
122
|
- [Import](https://github.com/caiopizzol/keypin/blob/main/docs/import.md): moving an env file's values into 1Password
|
|
123
|
+
- [Infisical](https://github.com/caiopizzol/keypin/blob/main/docs/infisical.md): reading keys from Infisical instead
|
|
124
|
+
- [Service account](https://github.com/caiopizzol/keypin/blob/main/docs/service-account.md): 1Password on a server or
|
|
125
|
+
in CI
|
|
126
126
|
- [Publishing](https://github.com/caiopizzol/keypin/blob/main/docs/publishing.md): destinations, approvals and
|
|
127
127
|
`--plan`
|
|
128
|
-
- [Notes](https://github.com/caiopizzol/keypin/blob/main/docs/notes.md): `wrangler dev`,
|
|
129
|
-
files keypin keeps
|
|
128
|
+
- [Notes](https://github.com/caiopizzol/keypin/blob/main/docs/notes.md): `wrangler dev`, signing in to Cloudflare, and
|
|
129
|
+
the files keypin keeps
|
|
130
130
|
- [Development](https://github.com/caiopizzol/keypin/blob/main/docs/development.md): working on keypin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keypin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.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.
|
|
30
|
-
"@keypin/cli-darwin-x64": "0.
|
|
31
|
-
"@keypin/cli-linux-x64": "0.
|
|
32
|
-
"@keypin/cli-linux-arm64": "0.
|
|
29
|
+
"@keypin/cli-darwin-arm64": "0.21.0",
|
|
30
|
+
"@keypin/cli-darwin-x64": "0.21.0",
|
|
31
|
+
"@keypin/cli-linux-x64": "0.21.0",
|
|
32
|
+
"@keypin/cli-linux-arm64": "0.21.0"
|
|
33
33
|
}
|
|
34
34
|
}
|