keypin 0.5.0 → 0.7.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 +26 -2
- package/{chunk-a9k9235c.js → chunk-1rrcgz3h.js} +850 -282
- package/main.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -82,6 +82,19 @@ keypin run -- npm run dev # run a command with the dev keys
|
|
|
82
82
|
keypin publish API_TOKEN # write the prod value to the GitHub secret
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
+
### Coming from a .env
|
|
86
|
+
|
|
87
|
+
`keypin import` moves a `.env` file's values into new 1Password items and maps them:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
keypin import .env --vault Private --account my.1password.com
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
It shows each item it will create and waits for you to type `yes`. It never overwrites an item, and it never changes
|
|
94
|
+
the `.env` file. It names any variable it left only in the file; move those, then delete the file yourself, and
|
|
95
|
+
`keypin run -- <command>` provides the values.
|
|
96
|
+
See [Import](https://github.com/caiopizzol/keypin/blob/main/docs/import.md).
|
|
97
|
+
|
|
85
98
|
## Commands
|
|
86
99
|
|
|
87
100
|
```sh
|
|
@@ -89,13 +102,22 @@ keypin init [folder] # register a project and write a keypin.toml
|
|
|
89
102
|
keypin unregister [folder] # stop listing a project (its keypin.toml stays)
|
|
90
103
|
keypin status [--json] # every key, when it's due, and any problem
|
|
91
104
|
keypin discover [folder] # every key name a project uses, where it's set, and a draft map
|
|
105
|
+
# (--write saves the draft as keypin.toml and registers the project)
|
|
106
|
+
keypin import <env-file> --vault <vault>
|
|
107
|
+
# move an env file's values into 1Password and map them
|
|
92
108
|
keypin run -- <command> # run a command with the project's dev keys (--env for another)
|
|
93
109
|
keypin publish <VARIABLE> # check each destination's account, then write the key
|
|
110
|
+
keypin publish --all # publish every key, with one plan and one approval
|
|
111
|
+
keypin publish --all --plan # show that plan without a terminal, and write nothing
|
|
94
112
|
keypin rotate <VARIABLE> # replace a Cloudflare API token, then revoke the old one
|
|
95
113
|
```
|
|
96
114
|
|
|
97
|
-
`publish`
|
|
98
|
-
|
|
115
|
+
Add `--plan` to `publish` or `rotate` to see the plan without a terminal. It changes nothing, and prints the
|
|
116
|
+
command that does.
|
|
117
|
+
|
|
118
|
+
`import`, `publish` and `rotate` show a plan and wait for you to type `yes`. `--yes` approves `import`, which only
|
|
119
|
+
creates new items. For `publish` and `rotate`, it skips that only for routine updates: it never approves a first
|
|
120
|
+
write, a changed account or vault item, or a revoke. `keypin --help` lists the exit codes.
|
|
99
121
|
|
|
100
122
|
## Docs
|
|
101
123
|
|
|
@@ -103,6 +125,8 @@ never approves a first write, a changed account or vault item, or a revoke. `key
|
|
|
103
125
|
`keypin.toml` and in the vault items.
|
|
104
126
|
- [Discover](https://github.com/caiopizzol/keypin/blob/main/docs/discover.md): what `discover` reads, the problems
|
|
105
127
|
it reports, and its draft map.
|
|
128
|
+
- [Import](https://github.com/caiopizzol/keypin/blob/main/docs/import.md): moving a `.env` file's values into
|
|
129
|
+
1Password.
|
|
106
130
|
- [Publishing](https://github.com/caiopizzol/keypin/blob/main/docs/publishing.md): destinations, account checks and
|
|
107
131
|
approvals.
|
|
108
132
|
- [Rotation](https://github.com/caiopizzol/keypin/blob/main/docs/rotation.md): how `rotate` works, and the admin
|