@dotenvx/dotenvx 1.51.3 → 1.52.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/CHANGELOG.md +14 -4
- package/README.md +50 -41
- package/package.json +1 -1
- package/src/cli/actions/encrypt.js +3 -2
- package/src/cli/actions/rotate.js +3 -2
- package/src/cli/actions/set.js +3 -2
- package/src/lib/helpers/executeDynamic.js +7 -36
- package/src/lib/main.js +9 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.52.0...main)
|
|
6
|
+
|
|
7
|
+
## [1.52.0](https://github.com/dotenvx/dotenvx/compare/v1.51.4...v1.52.0) (2026-01-22)
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* Pass log level options to `main.set` ([#731](https://github.com/dotenvx/dotenvx/pull/731))
|
|
12
|
+
|
|
13
|
+
## [1.51.4](https://github.com/dotenvx/dotenvx/compare/v1.51.3...v1.51.4) (2025-12-29)
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
* Change description of `dotenvx-ops` to better reflect its tooling as operational primitives on top of dotenvx for production use cases. ([#721](https://github.com/dotenvx/dotenvx/pull/723))
|
|
6
18
|
|
|
7
19
|
## [1.51.3](https://github.com/dotenvx/dotenvx/compare/v1.51.2...v1.51.3) (2025-12-29)
|
|
8
20
|
|
|
@@ -47,7 +59,7 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
47
59
|
```
|
|
48
60
|
_______________________________________________________________________
|
|
49
61
|
| |
|
|
50
|
-
|
|
|
62
|
+
| dotenvx-ops: production grade dotenvx–with operational primitives |
|
|
51
63
|
| |
|
|
52
64
|
| ░▒▓██████▓▒░░▒▓███████▓▒░ ░▒▓███████▓▒░ |
|
|
53
65
|
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
|
|
@@ -57,8 +69,6 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
57
69
|
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ |
|
|
58
70
|
| ░▒▓██████▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░ |
|
|
59
71
|
| |
|
|
60
|
-
| Use dotenvx across your team, infrastructure, agents, and more. |
|
|
61
|
-
| |
|
|
62
72
|
| Learn more at https://dotenvx.com/ops |
|
|
63
73
|
|_______________________________________________________________________|
|
|
64
74
|
```
|
package/README.md
CHANGED
|
@@ -2568,6 +2568,17 @@ const dotenvx = require('@dotenvx/dotenvx')
|
|
|
2568
2568
|
dotenvx.set('HELLO', 'World', { path: '.env' })
|
|
2569
2569
|
```
|
|
2570
2570
|
|
|
2571
|
+
</details>
|
|
2572
|
+
<details><summary>`set(KEY, value, {plain:})`</summary><br>
|
|
2573
|
+
|
|
2574
|
+
Programmatically set a plaintext environment variable.
|
|
2575
|
+
|
|
2576
|
+
```js
|
|
2577
|
+
// index.js
|
|
2578
|
+
const dotenvx = require('@dotenvx/dotenvx')
|
|
2579
|
+
dotenvx.set('HELLO', 'World', { plain: true })
|
|
2580
|
+
```
|
|
2581
|
+
|
|
2571
2582
|
</details>
|
|
2572
2583
|
<details><summary>`get(KEY)` - <i>Decryption at Access</i></summary><br>
|
|
2573
2584
|
|
|
@@ -2590,44 +2601,40 @@ This is known as *Decryption at Access* and is written about in [the whitepaper]
|
|
|
2590
2601
|
|
|
2591
2602
|
[](https://dotenvx.com/ops)
|
|
2592
2603
|
|
|
2593
|
-
|
|
2604
|
+
*production grade dotenvx*–with operational primitives.
|
|
2594
2605
|
|
|
2595
|
-
|
|
2606
|
+
> As dotenvx spreads inside companies, we're learning—through enterprise engagements—that dotenvx is missing an operations layer.
|
|
2607
|
+
>
|
|
2608
|
+
> Dotenvx Ops is our answer.
|
|
2609
|
+
>
|
|
2610
|
+
> It's production grade dotenvx–with operational primitives for teams, infrastructure, and agents. Private key management, access controls, and more.
|
|
2596
2611
|
|
|
2597
|
-
###
|
|
2612
|
+
### Quickstart
|
|
2598
2613
|
|
|
2599
|
-
|
|
2614
|
+
Install it and gain `ops` commands.
|
|
2600
2615
|
|
|
2601
2616
|
```sh
|
|
2602
2617
|
$ curl -sfS https://dotenvx.sh/ops | sh
|
|
2618
|
+
$ dotenvx ops backup
|
|
2619
|
+
✔ backed up [username/project]
|
|
2620
|
+
⮕ next run [dotenvx-ops open] to view
|
|
2603
2621
|
```
|
|
2604
2622
|
|
|
2605
|
-
|
|
2623
|
+
### CLI
|
|
2606
2624
|
|
|
2607
|
-
|
|
2608
|
-
$ dotenvx-ops login
|
|
2609
|
-
✔ logged in [username]
|
|
2610
|
-
```
|
|
2625
|
+
<details><summary>`ops backup`</summary><br>
|
|
2611
2626
|
|
|
2612
|
-
|
|
2627
|
+
Back up .env.keys.
|
|
2613
2628
|
|
|
2614
2629
|
```sh
|
|
2615
|
-
$ dotenvx
|
|
2616
|
-
|
|
2617
|
-
[dotenvx@1.0.0] injecting env (1) from .env
|
|
2630
|
+
$ dotenvx-ops backup
|
|
2631
|
+
✔ backed up [username/project]
|
|
2618
2632
|
```
|
|
2619
2633
|
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
### UI
|
|
2623
|
-
|
|
2624
|
-

|
|
2625
|
-
|
|
2626
|
-
### CLI
|
|
2627
|
-
|
|
2628
|
-
<details><summary>`login`</summary><br>
|
|
2634
|
+
</details>
|
|
2635
|
+
<details><summary>`ops login`</summary><br>
|
|
2629
2636
|
|
|
2630
|
-
Log in
|
|
2637
|
+
Log in.
|
|
2631
2638
|
|
|
2632
2639
|
```sh
|
|
2633
2640
|
$ dotenvx-ops login
|
|
@@ -2637,25 +2644,15 @@ press Enter to open [https://ops.dotenvx.com/login/device] and enter code [D9C1-
|
|
|
2637
2644
|
```
|
|
2638
2645
|
|
|
2639
2646
|
</details>
|
|
2640
|
-
<details><summary>`logout`</summary><br>
|
|
2647
|
+
<details><summary>`ops logout`</summary><br>
|
|
2641
2648
|
|
|
2642
|
-
Log out
|
|
2649
|
+
Log out.
|
|
2643
2650
|
|
|
2644
2651
|
```sh
|
|
2645
|
-
$ dotenvx
|
|
2652
|
+
$ dotenvx ops logout
|
|
2646
2653
|
✔ logged out [username] from this device and revoked token [dxo_5ZrwRXV…]
|
|
2647
2654
|
```
|
|
2648
2655
|
|
|
2649
|
-
</details>
|
|
2650
|
-
<details><summary>`status`</summary><br>
|
|
2651
|
-
|
|
2652
|
-
Check current status of [Ops](https://dotenvx.com/ops) - `on` or `off` (logged in or out).
|
|
2653
|
-
|
|
2654
|
-
```sh
|
|
2655
|
-
$ dotenvx-ops status
|
|
2656
|
-
on
|
|
2657
|
-
```
|
|
2658
|
-
|
|
2659
2656
|
</details>
|
|
2660
2657
|
<details><summary>`settings`</summary><br>
|
|
2661
2658
|
|
|
@@ -2668,13 +2665,25 @@ Usage: dotenvx-ops settings [options] [command]
|
|
|
2668
2665
|
⚙️ settings
|
|
2669
2666
|
|
|
2670
2667
|
Options:
|
|
2671
|
-
-h, --help
|
|
2668
|
+
-h, --help display help for command
|
|
2672
2669
|
|
|
2673
2670
|
Commands:
|
|
2674
|
-
username
|
|
2675
|
-
token [options]
|
|
2676
|
-
|
|
2677
|
-
|
|
2671
|
+
username print your username
|
|
2672
|
+
token [options] print your access token (--unmask)
|
|
2673
|
+
device [options] print your device pubkey (--unmask)
|
|
2674
|
+
hostname print hostname
|
|
2675
|
+
path print path to settings file
|
|
2676
|
+
help [command] display help for command
|
|
2677
|
+
```
|
|
2678
|
+
|
|
2679
|
+
</details>
|
|
2680
|
+
<details><summary>`ops status`</summary><br>
|
|
2681
|
+
|
|
2682
|
+
Check current status of [Ops](https://dotenvx.com/ops) - `on` or `off` (logged in or out).
|
|
2683
|
+
|
|
2684
|
+
```sh
|
|
2685
|
+
$ dotenvx ops status
|
|
2686
|
+
on
|
|
2678
2687
|
```
|
|
2679
2688
|
|
|
2680
2689
|
</details>
|
package/package.json
CHANGED
|
@@ -62,12 +62,13 @@ function encrypt () {
|
|
|
62
62
|
for (const processedEnv of processedEnvs) {
|
|
63
63
|
if (processedEnv.privateKeyAdded) {
|
|
64
64
|
logger.success(`✔ key added to .env.keys (${processedEnv.privateKeyName})`)
|
|
65
|
+
logger.help('⮕ optional: [dotenvx ops backup] to securely backup private key')
|
|
65
66
|
|
|
66
67
|
if (!isIgnoringDotenvKeys()) {
|
|
67
|
-
logger.help('⮕ next run [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
68
|
+
logger.help('⮕ next run: [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
logger.help(`⮕ next run [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx run -- yourcommand] to test decryption locally`)
|
|
71
|
+
logger.help(`⮕ next run: [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx run -- yourcommand] to test decryption locally`)
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
} catch (error) {
|
|
@@ -65,12 +65,13 @@ function rotate () {
|
|
|
65
65
|
for (const processedEnv of processedEnvs) {
|
|
66
66
|
if (processedEnv.privateKeyAdded) {
|
|
67
67
|
logger.success(`✔ key added to .env.keys (${processedEnv.privateKeyName})`)
|
|
68
|
+
logger.help('⮕ optional: [dotenvx ops backup] to securely backup private key')
|
|
68
69
|
|
|
69
70
|
if (!isIgnoringDotenvKeys()) {
|
|
70
|
-
logger.help('⮕ next run [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
71
|
+
logger.help('⮕ next run: [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
logger.help(`⮕ next run [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx get] to test decryption locally`)
|
|
74
|
+
logger.help(`⮕ next run: [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx get] to test decryption locally`)
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
} catch (error) {
|
package/src/cli/actions/set.js
CHANGED
|
@@ -67,12 +67,13 @@ function set (key, value) {
|
|
|
67
67
|
for (const processedEnv of processedEnvs) {
|
|
68
68
|
if (processedEnv.privateKeyAdded) {
|
|
69
69
|
logger.success(`✔ key added to ${processedEnv.envKeysFilepath} (${processedEnv.privateKeyName})`)
|
|
70
|
+
logger.help('⮕ optional: [dotenvx ops backup] to securely backup private key')
|
|
70
71
|
|
|
71
72
|
if (!isIgnoringDotenvKeys()) {
|
|
72
|
-
logger.help('⮕ next run [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
73
|
+
logger.help('⮕ next run: [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
73
74
|
}
|
|
74
75
|
|
|
75
|
-
logger.help(`⮕ next run [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx get ${key}] to test decryption locally`)
|
|
76
|
+
logger.help(`⮕ next run: [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx get ${key}] to test decryption locally`)
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
} catch (error) {
|
|
@@ -22,14 +22,14 @@ function executeDynamic (program, command, rawArgs) {
|
|
|
22
22
|
|
|
23
23
|
const result = childProcess.spawnSync(`dotenvx-${command}`, forwardedArgs, { stdio: 'inherit', env })
|
|
24
24
|
if (result.error) {
|
|
25
|
-
if (command === '
|
|
26
|
-
logger.warn(`[INSTALLATION_NEEDED] install dotenvx-${command} to use [dotenvx
|
|
27
|
-
logger.warn('[DEPRECATION NOTICE] dotenvx-
|
|
28
|
-
logger.help('? see installation instructions [https://
|
|
25
|
+
if (command === 'radar') {
|
|
26
|
+
logger.warn(`[INSTALLATION_NEEDED] install dotenvx-${command} to use [dotenvx ${command}] 📡`)
|
|
27
|
+
logger.warn('[DEPRECATION NOTICE] dotenvx-radar to be sunsetted soon (2026) and its featureset to be rolled into dotenvx-ops')
|
|
28
|
+
logger.help('? see installation instructions [https://dotenvx.com/radar]')
|
|
29
29
|
} else if (command === 'ops') {
|
|
30
30
|
const ops = ` _______________________________________________________________________
|
|
31
31
|
| |
|
|
32
|
-
|
|
|
32
|
+
| dotenvx-ops: production grade dotenvx–with operational primitives |
|
|
33
33
|
| |
|
|
34
34
|
| ░▒▓██████▓▒░░▒▓███████▓▒░ ░▒▓███████▓▒░ |
|
|
35
35
|
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ |
|
|
@@ -39,43 +39,14 @@ function executeDynamic (program, command, rawArgs) {
|
|
|
39
39
|
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ |
|
|
40
40
|
| ░▒▓██████▓▒░░▒▓█▓▒░ ░▒▓███████▓▒░ |
|
|
41
41
|
| |
|
|
42
|
-
| Use dotenvx across your team, infrastructure, agents, and more. |
|
|
43
|
-
| |
|
|
44
42
|
| Learn more at https://dotenvx.com/ops |
|
|
45
|
-
| |
|
|
46
|
-
| --------------------------------------------------------------------- |
|
|
47
|
-
| - thank you for using dotenvx! - @motdotla |
|
|
48
43
|
|_______________________________________________________________________|`
|
|
49
44
|
|
|
50
45
|
console.log(ops)
|
|
51
46
|
console.log('')
|
|
52
47
|
logger.warn(`[INSTALLATION_NEEDED] install dotenvx-${command} to use [dotenvx ${command}] 🏰`)
|
|
53
|
-
logger.help('
|
|
54
|
-
|
|
55
|
-
const radar = ` _______________________________________________________________________
|
|
56
|
-
| |
|
|
57
|
-
| Dotenvx Radar: Env Observability |
|
|
58
|
-
| |
|
|
59
|
-
| ░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░ |
|
|
60
|
-
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
|
|
61
|
-
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
|
|
62
|
-
| ░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓███████▓▒░ |
|
|
63
|
-
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
|
|
64
|
-
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
|
|
65
|
-
| ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ |
|
|
66
|
-
| |
|
|
67
|
-
| Observe, version, and back up your environment variables at runtime. |
|
|
68
|
-
| |
|
|
69
|
-
| Purchase lifetime access at https://dotenvx.com/radar |
|
|
70
|
-
| |
|
|
71
|
-
| --------------------------------------------------------------------- |
|
|
72
|
-
| - thank you for using dotenvx! - @motdotla |
|
|
73
|
-
|_______________________________________________________________________|`
|
|
74
|
-
|
|
75
|
-
console.log(radar)
|
|
76
|
-
console.log('')
|
|
77
|
-
logger.warn(`[INSTALLATION_NEEDED] install dotenvx-${command} to use [dotenvx ${command}] 📡`)
|
|
78
|
-
logger.help('? see installation instructions [https://dotenvx.com/radar]')
|
|
48
|
+
logger.help('⮕ next run: [curl -sfS https://dotenvx.sh/ops | sh]')
|
|
49
|
+
logger.help('⮕ see more: [https://dotenvx.com/ops]')
|
|
79
50
|
} else {
|
|
80
51
|
logger.info(`error: unknown command '${command}'`)
|
|
81
52
|
}
|
package/src/lib/main.js
CHANGED
|
@@ -188,6 +188,12 @@ const set = function (key, value, options = {}) {
|
|
|
188
188
|
encrypt = false
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
if (options) {
|
|
192
|
+
setLogLevel(options)
|
|
193
|
+
setLogName(options)
|
|
194
|
+
setLogVersion(options)
|
|
195
|
+
}
|
|
196
|
+
|
|
191
197
|
const envs = buildEnvs(options)
|
|
192
198
|
const envKeysFilepath = options.envKeysFile
|
|
193
199
|
|
|
@@ -235,12 +241,13 @@ const set = function (key, value, options = {}) {
|
|
|
235
241
|
for (const processedEnv of processedEnvs) {
|
|
236
242
|
if (processedEnv.privateKeyAdded) {
|
|
237
243
|
logger.success(`✔ key added to ${processedEnv.envKeysFilepath} (${processedEnv.privateKeyName})`)
|
|
244
|
+
logger.help('⮕ optional: [dotenvx ops backup] to securely backup private key')
|
|
238
245
|
|
|
239
246
|
if (!isIgnoringDotenvKeys()) {
|
|
240
|
-
logger.help('⮕ next run [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
247
|
+
logger.help('⮕ next run: [dotenvx ext gitignore --pattern .env.keys] to gitignore .env.keys')
|
|
241
248
|
}
|
|
242
249
|
|
|
243
|
-
logger.help(`⮕ next run [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx get ${key}] to test decryption locally`)
|
|
250
|
+
logger.help(`⮕ next run: [${processedEnv.privateKeyName}='${processedEnv.privateKey}' dotenvx get ${key}] to test decryption locally`)
|
|
244
251
|
}
|
|
245
252
|
}
|
|
246
253
|
|