@dotenc/cli 0.6.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.
Files changed (3) hide show
  1. package/README.md +50 -4
  2. package/dist/cli.js +528 -274
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ![dotenc](/assets/logo.jpg "dotenc logo")
2
2
 
3
3
  [![NPM Version][npm-image]][npm-url]
4
- [![Github License][license-image]](LICENSE)
4
+ [![Github License][license-image]](https://github.com/ivanfilhoz/dotenc/blob/main/LICENSE)
5
5
  [![NPM Downloads][downloads-image]][npm-url]
6
6
  [![Codecov][codecov-image]][codecov-url]
7
7
 
@@ -47,6 +47,9 @@ Done.
47
47
  - [Editing an environment](#editing-an-environment)
48
48
  - [Run commands on an environment](#run-commands-on-an-environment)
49
49
  - [Checking your identity](#checking-your-identity)
50
+ - [Tooling and Maintenance](#tooling-and-maintenance)
51
+ - [CLI updates](#cli-updates)
52
+ - [Editor integration helpers](#editor-integration-helpers)
50
53
  - [Team Collaboration](#team-collaboration)
51
54
  - [Granting access to a new team member](#granting-access-to-a-new-team-member)
52
55
  - [Revoking access from a team member](#revoking-access-from-a-team-member)
@@ -170,6 +173,7 @@ dotenc env create [environment]
170
173
  ```
171
174
 
172
175
  This command creates a new encrypted environment file under the specified name (e.g., `.env.development.enc`). Your personal environment is created automatically during `init`.
176
+ Environment names may contain letters, numbers, dots (`.`), hyphens (`-`), and underscores (`_`).
173
177
 
174
178
  ### Listing environments
175
179
 
@@ -193,6 +197,9 @@ Example:
193
197
  dotenc config editor vim
194
198
  ```
195
199
 
200
+ Currently supported `dotenc config` key: `editor`.
201
+ You can include editor arguments, for example: `dotenc config editor "code --wait"`.
202
+
196
203
  ### Run commands on an environment
197
204
 
198
205
  For development, the `dev` command loads both the shared `development` environment and your personal environment automatically:
@@ -229,6 +236,12 @@ dotenc run -e base,production node app.js
229
236
 
230
237
  In the example above, `production` will override any variables also present in `base`.
231
238
 
239
+ If you want `run` to fail when any selected environment cannot be loaded, use strict mode:
240
+
241
+ ```bash
242
+ dotenc run --strict -e base,production node app.js
243
+ ```
244
+
232
245
  ### Checking your identity
233
246
 
234
247
  ```bash
@@ -237,6 +250,28 @@ dotenc whoami
237
250
 
238
251
  Shows your name, active SSH key, fingerprint, and the environments you have access to in this project.
239
252
 
253
+ ## Tooling and Maintenance
254
+
255
+ ### CLI updates
256
+
257
+ ```bash
258
+ dotenc update
259
+ ```
260
+
261
+ Runs the appropriate update flow for your installation method (Homebrew, Scoop, npm, or manual binary instructions).
262
+
263
+ ### Editor integration helpers
264
+
265
+ ```bash
266
+ dotenc tools install-vscode-extension
267
+ dotenc tools install-agent-skill
268
+ dotenc tools install-agent-skill --force
269
+ ```
270
+
271
+ - `install-vscode-extension` adds extension recommendations for supported editors and can open the extension page.
272
+ - `install-agent-skill` installs the dotenc agent skill through `npx skills add`.
273
+ - `--force` maps to non-interactive mode (`-y`) for automation.
274
+
240
275
  ## Team Collaboration
241
276
 
242
277
  In a real-world scenario, you will likely have multiple environments (e.g., `development`, `test`, `production`) and a team of developers who need access to these environments. Let's walk through how to set this up.
@@ -267,7 +302,7 @@ One of your team members, John, is leaving the company. You need to revoke his a
267
302
  dotenc key remove john
268
303
  ```
269
304
 
270
- This will delete his key from the repository and automatically reencrypt all the environments. Then, commit your changes:
305
+ This will delete his key from the repository and attempt to revoke and re-encrypt every affected environment. If one environment cannot be decrypted on your machine, dotenc will warn you so you can revoke access manually or rotate that environment. Then, commit your changes:
271
306
 
272
307
  ```bash
273
308
  git checkout -b revoke-john-key
@@ -408,6 +443,7 @@ Adds a public key into the project (`.dotenc/<name>.pub`).
408
443
  - `-f, --from-file <file>` — Read a public (or private) key from a PEM file.
409
444
  - `-s, --from-string <pem_string>` — Use a PEM string directly.
410
445
  - No arguments — Interactive mode: choose from your SSH keys or paste a PEM public key.
446
+ - Key names may contain letters, numbers, dots (`.`), hyphens (`-`), and underscores (`_`).
411
447
 
412
448
  ### Listing public keys
413
449
 
@@ -423,7 +459,7 @@ Lists all public keys in the project, showing each key's name and algorithm.
423
459
  dotenc key remove [name]
424
460
  ```
425
461
 
426
- Removes a public key from the project, automatically revoking it from every environment.
462
+ Removes a public key from the project, attempting to revoke it from every environment.
427
463
 
428
464
  ## Tips
429
465
 
@@ -445,6 +481,16 @@ Alternatively, the `DOTENC_ENV` variable can be used to set the environment, so
445
481
  dotenc run node app.js
446
482
  ```
447
483
 
484
+ ### Update checks
485
+
486
+ The CLI checks for new versions in the background (at most once every 6 hours) and prints a notification when an update is available.
487
+
488
+ To disable these checks:
489
+
490
+ ```bash
491
+ export DOTENC_SKIP_UPDATE_CHECK=1
492
+ ```
493
+
448
494
 
449
495
  ## How dotenc compares
450
496
 
@@ -470,7 +516,7 @@ It does not aim to replace centralized secret managers like Vault or Doppler —
470
516
 
471
517
  ## License
472
518
 
473
- [MIT](LICENSE)
519
+ [MIT](https://github.com/ivanfilhoz/dotenc/blob/main/LICENSE)
474
520
 
475
521
  [npm-image]: https://img.shields.io/npm/v/@dotenc/cli.svg
476
522
  [license-image]: https://img.shields.io/github/license/ivanfilhoz/dotenc.svg