keypin 0.5.0 → 0.6.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 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,18 @@ 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
94
111
  keypin rotate <VARIABLE> # replace a Cloudflare API token, then revoke the old one
95
112
  ```
96
113
 
97
- `publish` and `rotate` show a plan and wait for you to type `yes`. `--yes` skips that only for routine updates. It
98
- never approves a first write, a changed account or vault item, or a revoke. `keypin --help` lists the exit codes.
114
+ `import`, `publish` and `rotate` show a plan and wait for you to type `yes`. `--yes` approves `import`, which only
115
+ creates new items. For `publish` and `rotate`, it skips that only for routine updates: it never approves a first
116
+ write, a changed account or vault item, or a revoke. `keypin --help` lists the exit codes.
99
117
 
100
118
  ## Docs
101
119
 
@@ -103,6 +121,8 @@ never approves a first write, a changed account or vault item, or a revoke. `key
103
121
  `keypin.toml` and in the vault items.
104
122
  - [Discover](https://github.com/caiopizzol/keypin/blob/main/docs/discover.md): what `discover` reads, the problems
105
123
  it reports, and its draft map.
124
+ - [Import](https://github.com/caiopizzol/keypin/blob/main/docs/import.md): moving a `.env` file's values into
125
+ 1Password.
106
126
  - [Publishing](https://github.com/caiopizzol/keypin/blob/main/docs/publishing.md): destinations, account checks and
107
127
  approvals.
108
128
  - [Rotation](https://github.com/caiopizzol/keypin/blob/main/docs/rotation.md): how `rotate` works, and the admin