npm / @dotenvx/dotenvx
@dotenvx/dotenvx
What changed in @dotenvx/dotenvx 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
43 breaking12 security3 deprecations43 new APIs and options3 performance29 behavior and defaults38 tooling30 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@dotenvx/dotenvx 2139 changes
Breaking changes 33
File key storage is now the default in non-interactive mode.
Lock commands and support for unlocking were removed because passwords are too difficult to manage securely.
Automatically redacts stdout and stderr from config() when an Envfile is present.
Applies Envfile encryption rules to set.
The first file wins when combining Envfile rules.
Dotenvspec is now the filename.
The picker now presents three initial custody options: Local, Dotenvx Armor, and Password Managers.
Replaces the removed
dotenvx initcommand.The Envfile file was renamed to Envspec.
Replaces
dotenvx validateand now works from Envfile only; support for .env.example is dropped.Removes the command; use
dotenvx initinstead.The command is renamed to
dotenvx check; switch to using an Envfile.Only the owner can read from or write to the .env.keys file.
The
run --validateflag was removed; it is to be replaced with a modern validation scheme.The
validatecommand against.env.examplewas removed; it is to be replaced with a modern validation scheme.Private keys are stored in the OS secret store by default rather than in .env.keys.
Nested commands are no longer expanded.
The -p shorthand for --plain was removed; use --plain instead.
Keys are redacted by default, except keys ending in _PLAIN.
Informational messages such as
injected envare sent to stderr instead of stdout, making it more reliable to pipe output to a file without--quiet.ls from @dotenvx/dotenvx is now async/await, so callers must handle it asynchronously.
Renames the
keychaincommands tonativeto make way for Windows and Linux.Removes
--no-ops; use--no-armorinstead.The login command is now under armor.
The logout command is now under armor.
genexample is now a top-level command.
get returns exit code 1 when decryption errors are reported.
The library doctor export is removed from lib/main.
The library genexample export is removed from lib/main.
The library get operation is async only, so callers must use it asynchronously.
The library keypair export is removed from lib/main.
The rotate command is removed; the notes say it will return in a future release with a more complete implementation for local and armored keys.
The library set operation is async only, so callers must use it asynchronously.
Security 8
Secrets references are supported as safe from dotenvx protect.
Adds a command to prevent plaintext .env files from being committed to code on a machine.
The private key is sent to keychain via stdin instead of argv, addressing a security report.
Install verified binaries directly from GitHub Releases.
Adds
--redactto keep secrets out of command output.Adds a command for password protecting private keys.
Adds a command for password protecting private keys.
Supports restricted read permissions for .env.keys.
Deprecations 3
The command is deprecated; use dotenvx protect instead.
The command is deprecated; use dotenvx protect --docker instead.
The command is deprecated; use dotenvx protect instead.
New APIs and options 29
Adds getSync as a convenience.
Adds Enclaved as an Armor key type, for software enclaved on remote providers such as Vercel and GitHub Actions.
Adds
encrypt --withto bring a public key and encrypt locally for decryption only on remote software enclaves.Selects combinations of .env files through Envfile profiles.
Selects combinations of .env files through Envfile profiles.
Envfile is now the filename developers should use.
You can choose where to custody keys: locally in the OS, 1Password, Bitwarden, or .env.keys, or with managed custody through Armor.
Private keys can now be stored in Bitwarden or 1Password.
The DOTENV_CONFIG_* variable is renamed to this variable; its existing name remains supported as a fallback.
This environment variable accepts comma-separated env file paths.
The DOTENV_CONFIG_* variable is renamed to this variable; its existing name remains supported as a fallback.
This environment variable accepts comma-separated env file paths.
The -f option accepts comma-separated env file paths.
Adds support for the DOTENV_CONFIG_IGNORE global convenience.
Supports Bitwarden secrets in .env files using the bw:// scheme.
Adds support for -ek to dotenvx get.
Adds support for -ik to dotenvx get.
You can use 1Password op:// secrets in .env files.
Adds --validate to check environment variables against .env.example.
Adds the --eval-export flag to get.
The --mask option is supported with get, run, and decrypt.
The native up, down, pull, and push commands are supported on Windows.
config(path:) supports a directory such as app/web, which is useful for monorepos.
Select commands now support multiple -fk flags.
Use these commands to move your private keys to your macOS Keychain.
Adds support for the nextjs convention through DOTENV_CONFIG_CONVENTION.
Supports DOTENV_CONFIG_QUIET=true as a synonym for the --quiet flag.
The set command gains an interactive input mode.
Adds keyring support for local and armor providers, with the aim of enabling future providers.
Performance 2
Startup time for the CLI is improved.
The bundle size was improved.
Behavior and default changes 21
Uses atomic file writes in
protect.Applies Envfile encryption rules to encrypt.
Applies Envfile encryption rules to protect.
Validates final values when Envfile rules are combined.
Envspec rules now guide check, run, encrypt, and protect.
armor up should read from the OS secret store, 1Password, and Bitwarden.
Some commands are moved under a hidden menu.
The path option accepts comma-separated env file paths.
The DOTENV_CONFIG_* variable is renamed to this variable; its existing name remains supported as a fallback.
Installation falls back to ~/.local/bin when /usr/local/bin is not writable.
Exempts .env.vault from precommit and prebuild sealed checks because vault-format ciphertext is already safe to commit.
Pressing Enter opens the approval URL for convenience.
Curl requests now include a device identifier.
Pkg-ed binaries support nested node invocations.
The default encrypted .env file is simplified to contain just HELLO="World".
The -f flag now supports directories.
The set command now permits an empty value.
prebuild now respects _PLAIN.
precommit now respects _PLAIN.
Keys with the _PLAIN suffix can be left unencrypted when using set or encrypt.
Library parse now uses primitive parsing while preserving dotenvx-style errors for encrypted values.
Tooling 27
Adds the dotenvx armor invite command.
The command now returns provider information.
Validates final values when Envfile rules are combined.
Adds a command for giving feedback on the CLI.
Adds a command for generating your Envfile.
CLI audit logging is added for Armor customers.
Adds the down command for 1Password integration.
Adds the pull command for 1Password integration.
Adds the push command for 1Password integration.
Adds the up command for 1Password integration.
Adds the down command for Bitwarden integration.
Adds the pull command for Bitwarden integration.
Adds the push command for Bitwarden integration.
Adds the up command for Bitwarden integration.
Adds dec as a shorthand for decrypt.
Adds enc as a shorthand for encrypt.
Adds a convenient alias for shorter commands such as dx run -- and dx enc.
Patches the TypeScript types for path.
Adds a command for deleting a key from a .env file.
Adds a command to open armored key details in a browser.
Adds a command for making authenticated API calls to the Dotenvx Armor API, allowing you to control your account from an agent.
.env.examplefiles in subdirectories are exempt from precommit.Adds a command to pre-check validation against the .env.example file.
Supports running
claudeandcodexwithdotenvx run --.Adds a convenience method for updating dotenvx.
Adds the dotenvx armor status command.
The login command attempts to store DOTENVX_ARMOR_TOKEN in the native OS secret store. Current Armor users can run dotenvx armor logout and then dotenvx armor login to use this immediately.
Fixes and other changes 16
Fixes an atomic edge case when writing .env and .env.keys files.
The CLI no longer writes the public key when the user presses Ctrl+C or a prompt fails.
Restores ESM named imports such as
import { config } from '@dotenvx/dotenvx', which were broken in 2.30.0.Handles accent marks when using ext precommit.
Patched the injected message when the preset value is encrypted.
Handles ctrl + c better.
Dotenvx no longer reports child errors; the child reports them instead.
Time spent waiting on 1Password is now communicated with elapsed time, making the wait clearer to users.
Makes get --eval POSIX safe.
Escaped apostrophes in single-quoted values now correctly resolve to apostrophes.
Improves command substitution for nested commands.
Adds support for Enclaved Armored Keys.
Adds a FILE_NOT_WRITABLE error for user convenience.
With --quiet, the spinner and its stderr messages are no longer displayed.
Corrects default valuation interpolation for empty strings.
Patches an edge case involving a custom unspecified -f and the --env flag.
@dotenvx/dotenvx 162 changes
Breaking changes 10
The update available notification is shown only for armor commands.
stderr changed to inherit for dotenvx-armor integration.
The fully deprecated opsOff option was removed in favor of noOps.
SIGINT handling now respects handler completion.
Ops users now see stderr surfaced.
Error logs are improved and most are compacted to a single line.
CLI output colors and formatting changed.
Support for .env.vault files is removed.
The
ops observecommand was removed; download dotenvx-ops if needed.The radar command was removed; it had been replaced by ops.
Security 4
Adds a command to armor a private key, helping move private keys off device and under access control with Dotenvx Ops.
Guards against command substitution following encrypted: values.
Adds a security feature for hardening private keys when dotenvx-ops is installed.
Adds a hint about .env.keys, noting that Dotenvx Armor can securely armor private keys as an alternative to manually copying them in and out of 1Password.
New APIs and options 14
An override package is additionally published for use with @dotenvx/next-env.
Optional --token support is added for automation by Armor users.
Passes -f to ops, allowing the option to be used with the ops command.
The parse API now supports the ignore option.
A simpler --no-spinner flag is passed to ops to improve spinner message blinking.
Duplicate keys can now be replaced with different values.
Adds a command to dearmor a private key.
The --env flag supports encrypted values.
Adds support for colon format to match Cloudflare Wrangler's --var flag format.
Adds support for passing env sources to config({ envs }), enabling simpler Cloudflare Worker integration.
Supports the --hostname flag for dotenvx-ops.login.
Pass this option to prevent file creation.
Adds --pp as shorthand for --pretty-print, toward sunsetting -pp.
main.set now accepts log level options, allowing developers to configure its logging level.
Performance 1
Coldstarts are faster.
Behavior and default changes 8
The ext commands become first-class.
Minor messaging improvements, especially when using armored keys.
Improves coordination of spinner messages between dotenvx and dotenvx-ops.
Prompts from ops should bubble up.
Now creates a .env file if one does not exist.
Now creates a .env file if one does not exist.
The runtime injection message now uses the format
⟐ injecting env (N) from FILE · dotenvx@VERSION.Respect the dotenvx-ops status setting when it is on or off.
Tooling 11
Armor commands are available directly inside dotenvx and remain optional under the professional security section.
The login command is now a first-class dotenvx command; login remains optional and is only needed for Armor features.
Commands are forwarded to Dotenvx Armor Key Guard approvals.
A prompt lets developers choose between local storage and armored storage.
Adds the
dotenvx doctorcommand.Adds a command to pull an armored key into .env.keys.
Adds a command to push an armored key from .env.keys.
Adds a login command that proxies to dotenvx-ops login.
Adds a logout command that proxies to dotenvx-ops logout.
Adds loading messages while run injects, encrypt and set encrypt, decrypt and get decrypt, rotate rotates, and keypair retrieves.
Type information was added for opsOff.
Fixes and other changes 14
The release is published as named binaries, changing how developers obtain the executable.
dotenvx now bundles @dotenvx/next-env for user convenience.
Fixed provenance for @dotenvx/next-env.
Touched up
dotenvx decryptwhen armor is installed.Touched up
dotenvx getwhen armor is installed.Touched up
dotenvx setwhen armor is installed.Dotenvx Ops/Vlt is now named Dotenvx Armor.
The precommit and prebuild shorthands were patched.
Communicates whether Ops stored keys are local keys or armored keys.
Adds the missing + key ⛨ marker for Ops stored keys.
The message shown when already installed was improved.
The success message shown after installation was simplified.
Leading glyphs provide a visual status language for successful actions, no-ops, warnings, and errors.
The ops off flag is now respected by get, keypair, rotate, and encrypt.