@dotenvx/dotenvx 2.17.3 → 2.18.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 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/v2.17.3...main)
5
+ [Unreleased](https://github.com/dotenvx/dotenvx/compare/v2.18.0...main)
6
+
7
+ ## [2.18.0](https://github.com/dotenvx/dotenvx/compare/v2.17.4...v2.18.0) (2026-07-25)
8
+
9
+ ### Added
10
+
11
+ * Make authenticated API calls to the Dotenvx Armor API with `dotenvx curl`. Allows you to control your Dotenvx Armor account directly from your agent inside Codex, Claude, etc. ([#923](https://github.com/dotenvx/dotenvx/pull/923))
12
+
13
+ ## [2.17.4](https://github.com/dotenvx/dotenvx/compare/v2.17.3...v2.17.4) (2026-07-24)
14
+
15
+ ### Changed
16
+
17
+ * Send device identifier along with curl requests ([#922](https://github.com/dotenvx/dotenvx/pull/922))
6
18
 
7
19
  ## [2.17.3](https://github.com/dotenvx/dotenvx/compare/v2.17.2...v2.17.3) (2026-07-23)
8
20
 
package/README.md CHANGED
@@ -3504,15 +3504,20 @@ There are global settings available that can be configured as environment variab
3504
3504
  <details><summary>Environment variables</summary><br>
3505
3505
 
3506
3506
  ```ini
3507
- # dotenvx native settings
3507
+ # config
3508
3508
  DOTENV_CONFIG_CONVENTION= # set to a default convention like 'nextjs' or 'flow'
3509
3509
  DOTENV_CONFIG_IGNORE= # MISSING_ENV_FILE,OTHER
3510
3510
  DOTENV_CONFIG_QUIET= # set to "true" to default to --quiet
3511
+
3512
+ # armor
3513
+ DOTENVX_ARMOR_TOKEN= # for api calls
3511
3514
  DOTENVX_NO_ARMOR= # set to "true" to turn off Armor support
3515
+
3516
+ # 1password
3512
3517
  DOTENVX_NO_1PASSWORD= # set to "true" to turn off 1Password support
3513
- DOTENVX_NO_BITWARDEN= # set to "true" to turn off Bitwarden support
3514
3518
 
3515
- # other machine settings respected by dotenvx
3519
+ # bitwarden
3520
+ DOTENVX_NO_BITWARDEN= # set to "true" to turn off Bitwarden support
3516
3521
  BW_SESSION= # set to bitwarden session token to bypass password prompt
3517
3522
  ```
3518
3523
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.17.3",
2
+ "version": "2.18.0",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a secure dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -48,7 +48,8 @@ async function curl () {
48
48
  const url = requestUrl(this.args[0], session.hostname())
49
49
  const headers = {
50
50
  Authorization: `Bearer ${token}`,
51
- Accept: 'application/json'
51
+ Accept: 'application/json',
52
+ 'dotenvx-device-public-key': session.devicePublicKey()
52
53
  }
53
54
  if (body !== undefined) headers['Content-Type'] = 'application/json'
54
55
 
@@ -1,6 +1,6 @@
1
1
  const { Command } = require('@dotenvx/tooling')
2
2
 
3
- const examples = require('./../examples')
3
+ const help = require('./../help')
4
4
  const executeExtension = require('../../lib/helpers/executeExtension')
5
5
  const removeDynamicHelpSection = require('../../lib/helpers/removeDynamicHelpSection')
6
6
 
@@ -41,7 +41,7 @@ ext.command('genexample')
41
41
  // dotenvx ext gitignore
42
42
  ext.command('gitignore')
43
43
  .description('append to .gitignore')
44
- .addHelpText('after', examples.gitignore)
44
+ .addHelpText('after', help.gitignore)
45
45
  .option('--pattern <patterns...>', 'pattern(s) to gitignore', ['.env*'])
46
46
  .action(function (...args) {
47
47
  return require('./../actions/ext/gitignore').apply(this, args)
@@ -50,7 +50,7 @@ ext.command('gitignore')
50
50
  // dotenvx ext prebuild
51
51
  ext.command('prebuild')
52
52
  .description('prevent including .env files in docker')
53
- .addHelpText('after', examples.prebuild)
53
+ .addHelpText('after', help.prebuild)
54
54
  .argument('[directory]', 'directory to prevent including .env files from', '.')
55
55
  .action(function (...args) {
56
56
  return require('./../actions/ext/prebuild').apply(this, args)
@@ -59,7 +59,7 @@ ext.command('prebuild')
59
59
  // dotenvx ext precommit
60
60
  ext.command('precommit')
61
61
  .description('prevent committing .env files to code')
62
- .addHelpText('after', examples.precommit)
62
+ .addHelpText('after', help.precommit)
63
63
  .argument('[directory]', 'directory to prevent committing .env files from', '.')
64
64
  .option('-i, --install', 'install to .git/hooks/pre-commit')
65
65
  .action(function (...args) {
@@ -5,7 +5,7 @@ const { Command } = require('@dotenvx/tooling')
5
5
  const program = new Command()
6
6
 
7
7
  const { setLogLevel } = require('../shared/logger')
8
- const examples = require('./examples')
8
+ const help = require('./help')
9
9
  const packageJson = require('./../lib/helpers/packageJson')
10
10
  const executeDynamic = require('./../lib/helpers/executeDynamic')
11
11
  const removeDynamicHelpSection = require('./../lib/helpers/removeDynamicHelpSection')
@@ -60,7 +60,7 @@ program
60
60
  // dotenvx run -- node index.js
61
61
  program.command('run')
62
62
  .description('inject env at runtime [dotenvx run -- yourcommand]')
63
- .addHelpText('after', examples.run)
63
+ .addHelpText('after', help.run)
64
64
  .option('-e, --env <strings...>', 'environment variable(s) set as string (example: "HELLO=World")', collectEnvs('env'), [])
65
65
  .option('-f, --env-file <path>', 'path(s) to your env file(s)', collectEnvs('envFile'), [])
66
66
  .option('-fk, --env-keys-file <path>', 'path(s) to your .env.keys file(s) (default: same path as your env file)', collectEnvKeys)
@@ -113,7 +113,7 @@ program.command('get')
113
113
  program.command('set')
114
114
  .usage('<KEY> [value] [options]')
115
115
  .description('encrypt a single environment variable')
116
- .addHelpText('after', examples.set)
116
+ .addHelpText('after', help.set)
117
117
  .allowUnknownOption()
118
118
  .argument('KEY', 'KEY')
119
119
  .argument('[value]', 'value')
@@ -211,7 +211,7 @@ program.command('validate')
211
211
  // dotenvx gitignore
212
212
  program.command('gitignore')
213
213
  .description('append to .gitignore')
214
- .addHelpText('after', examples.gitignore)
214
+ .addHelpText('after', help.gitignore)
215
215
  .option('--pattern <patterns...>', 'pattern(s) to gitignore', ['.env*'])
216
216
  .action(function (...args) {
217
217
  return require('./actions/ext/gitignore').apply(this, args)
@@ -229,7 +229,7 @@ program.command('genexample')
229
229
  // dotenvx precommit
230
230
  program.command('precommit')
231
231
  .description('prevent committing .env files to code')
232
- .addHelpText('after', examples.precommit)
232
+ .addHelpText('after', help.precommit)
233
233
  .argument('[directory]', 'directory to prevent committing .env files from', '.')
234
234
  .option('-i, --install', 'install to .git/hooks/pre-commit')
235
235
  .action(function (...args) {
@@ -239,7 +239,7 @@ program.command('precommit')
239
239
  // dotenvx prebuild
240
240
  program.command('prebuild')
241
241
  .description('prevent including .env files in docker')
242
- .addHelpText('after', examples.prebuild)
242
+ .addHelpText('after', help.prebuild)
243
243
  .argument('[directory]', 'directory to prevent including .env files from', '.')
244
244
  .action(function (...args) {
245
245
  return require('./actions/ext/prebuild').apply(this, args)
@@ -260,17 +260,6 @@ program.command('update')
260
260
  return require('./actions/update').apply(this, args)
261
261
  })
262
262
 
263
- // dotenvx curl
264
- program.command('curl', { hidden: true })
265
- .description('make an authenticated dotenvx API request')
266
- .argument('<url>', 'dotenvx API URL')
267
- .option('-X, --request <method>', 'HTTP request method')
268
- .option('--data <json>', 'JSON request body')
269
- .option('--token <token>', 'set Armor ⛨ token')
270
- .action(function (...args) {
271
- return require('./actions/curl').apply(this, args)
272
- })
273
-
274
263
  // dotenvx login (compatibility alias for dotenvx armor login)
275
264
  program.command('login', { hidden: true })
276
265
  .description('log in to move keys off-device, share with your team, and audit access')
@@ -289,6 +278,18 @@ program.command('logout', { hidden: true })
289
278
  return require('./actions/logout').apply(this, args)
290
279
  })
291
280
 
281
+ // dotenvx curl
282
+ program.command('curl', { hidden: true })
283
+ .description('Dotenvx Armor API')
284
+ .addHelpText('after', help.curl)
285
+ .argument('<url>', '(run dotenvx run --help for list of urls)')
286
+ .option('-X, --request <method>', 'HTTP request method')
287
+ .option('--data <json>', 'JSON request body')
288
+ .option('--token <token>', 'set token')
289
+ .action(function (...args) {
290
+ return require('./actions/curl').apply(this, args)
291
+ })
292
+
292
293
  // dotenvx help
293
294
  program.command('help [command]')
294
295
  .description('display help for command')
@@ -311,6 +312,7 @@ program.addHelpText('after', 'Professional Security: ')
311
312
  program.addHelpText('after', ' lock ⊡ lock private keys with a local passphrase')
312
313
  program.addHelpText('after', ' native ⌥ move private keys into your OS secret store')
313
314
  program.addHelpText('after', ' armor ⛨ move private keys into Dotenvx Armor [www.dotenvx.com/armor]')
315
+ program.addHelpText('after', ' curl ⛨ call authenticated api to Dotenvx Armor [www.dotenvx.com/armor]')
314
316
 
315
317
  // dotenvx native
316
318
  require('./commands/native')(program.command('native', { hidden: true }))
@@ -90,10 +90,43 @@ Examples:
90
90
  `
91
91
  }
92
92
 
93
+ const curl = function () {
94
+ return `
95
+ Endpoints:
96
+
97
+ GET /api/account
98
+ GET /api/armor/keypairs
99
+ GET /api/armor/keypairs/:public_key
100
+ POST /api/armor/keypairs/:public_key/settings/guard
101
+ POST /api/armor/keypairs/:public_key/settings/enclave
102
+ GET /api/teams
103
+ GET /api/teams/:team
104
+ GET /api/teams/:team/members
105
+ GET /api/teams/:team/invitations
106
+ POST /api/teams/:team/invitations
107
+ DELETE /api/teams/:team/invitations/:id
108
+
109
+ Examples:
110
+
111
+ dotenvx curl https://armor.dotenvx.com/api/account
112
+ dotenvx curl https://armor.dotenvx.com/api/armor/keypairs
113
+ dotenvx curl https://armor.dotenvx.com/api/armor/keypairs/PUBLIC_KEY
114
+ dotenvx curl https://armor.dotenvx.com/api/armor/keypairs/PUBLIC_KEY/settings/guard --data '{"value":true}'
115
+ dotenvx curl https://armor.dotenvx.com/api/armor/keypairs/PUBLIC_KEY/settings/enclave --data '{"value":true}'
116
+ dotenvx curl https://armor.dotenvx.com/api/teams
117
+ dotenvx curl https://armor.dotenvx.com/api/teams/TEAM
118
+ dotenvx curl https://armor.dotenvx.com/api/teams/TEAM/members
119
+ dotenvx curl https://armor.dotenvx.com/api/teams/TEAM/members
120
+ dotenvx curl https://armor.dotenvx.com/api/teams/TEAM/invitations --data '{"email":"person@example.com","role":"member"}'
121
+ dotenvx curl https://armor.dotenvx.com/api/teams/TEAM/invitations/123 --request DELETE
122
+ `
123
+ }
124
+
93
125
  module.exports = {
94
126
  run,
95
127
  precommit,
96
128
  prebuild,
97
129
  gitignore,
98
- set
130
+ set,
131
+ curl
99
132
  }