Changelog
All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
17.4.2 (2026-04-12)
Changed
- Improved skill files - tightened up details (#1009)
17.4.1 (2026-04-05)
Changed
- Change text
injecting to injected (#1005)
17.4.0 (2026-04-01)
Added
- Add
skills/ folder with focused agent skills: skills/dotenv/SKILL.md (core usage) and skills/dotenvx/SKILL.md (encryption, multiple environments, variable expansion) for AI coding agent discovery via the skills.sh ecosystem (npx skills add motdotla/dotenv)
Changed
- Tighten up logs:
◇ injecting env (14) from .env (#1003)
17.3.1 (2026-02-12)
Changed
- Fix as2 example command in README and update spanish README
17.3.0 (2026-02-12)
Added
- Add a new README section on dotenv’s approach to the agentic future.
Changed
- Rewrite README to get humans started more quickly with less noise while simultaneously making more accessible for llms and agents to go deeper into details.
17.2.4 (2026-02-05)
Changed
- Make
DotenvPopulateInput accept NodeJS.ProcessEnv type (#915)
- Give back to dotenv by checking out my newest project vestauth. It is auth for agents. Thank you for using my software.
17.2.3 (2025-09-29)
Changed
- Fixed typescript error definition (#912)
17.2.2 (2025-09-02)
Added
- 🙏 A big thank you to new sponsor Tuple.app - the premier screen sharing app for developers on macOS and Windows. Go check them out. It's wonderful and generous of them to give back to open source by sponsoring dotenv. Give them some love back.
17.2.1 (2025-07-24)
Changed
- Fix clickable tip links by removing parentheses (#897)
17.2.0 (2025-07-09)
Added
- Optionally specify
DOTENV_CONFIG_QUIET=true in your environment or .env file to quiet the runtime log (#889)
Just like dotenv any DOTENV_CONFIG_ environment variables take precedence over any code set options like ({quiet: false})
# .env
DOTENV_CONFIG_QUIET=true
HELLO="World"
// index.js
require('dotenv').config()
console.log(`Hello ${process.env.HELLO}`)
$ node index.js
Hello World
or
$ DOTENV_CONFIG_QUIET=true node index.js
17.1.0 (2025-07-07)
Added
- Add additional security and configuration tips to the runtime log (#884)
Dim the tips text from the main injection information text
const TIPS = [
'🔐 encrypt with dotenvx: https://dotenvx.com',
'🔐 prevent committing .env to code: https://dotenvx.com/precommit',
'🔐 prevent building .env in docker: https://dotenvx.com/prebuild',
'🛠️ run anywhere with `dotenvx run -- yourcommand`',
'⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }',
'⚙️ enable debug logging with { debug: true }',
'⚙️ override existing env vars with { override: true }',
'⚙️ suppress all logs with { quiet: true }',
'⚙️ write to custom object with { processEnv: myObject }',
'⚙️ load multiple .env files with { path: [\'.env.local\', \'.env\'] }'
]
17.0.1 (2025-07-01)
Changed
- Patched injected log to count only populated/set keys to process.env (#879)
17.0.0 (2025-06-27)
Changed
- Default
quiet to false - informational (file and keys count) runtime log message shows by default (#875)
16.6.1 (2025-06-27)
Changed
- Default
quiet to true – hiding the runtime log message (#874)
- NOTICE: 17.0.0 will be released with quiet defaulting to false. Use
config({ quiet: true }) to suppress.
- And check out the new dotenvx. As coding workflows evolve and agents increasingly handle secrets, encrypted .env files offer a much safer way to deploy both agents and code together with secure secrets. Simply switch
require('dotenv').config() for require('@dotenvx/dotenvx').config().
16.6.0 (2025-06-26)
Added
- Default log helpful message
[dotenv@16.6.0] injecting env (1) from .env (#870)
- Use
{ quiet: true } to suppress
- Aligns dotenv more closely with dotenvx.
16.5.0 (2025-04-07)
Added
- 🎉 Added new sponsor Graphite - the AI developer productivity platform helping teams on GitHub ship higher quality software, faster.
[!TIP]
Become a sponsor
The dotenvx README is viewed thousands of times DAILY on GitHub and NPM.
Sponsoring dotenv is a great way to get in front of developers and give back to the developer community at the same time.
Changed
- Remove
_log method. Use _debug #862
16.4.7 (2024-12-03)
Changed
- Ignore
.tap folder when publishing. (oops, sorry about that everyone. - @motdotla) #848
16.4.6 (2024-12-02)
Changed
- Clean up stale dev dependencies #847
- Various README updates clarifying usage and alternative solutions using dotenvx
16.4.5 (2024-02-19)
Changed
- 🐞 Fix recent regression when using
path option. return to historical behavior: do not attempt to auto find .env if path set. (regression was introduced in 16.4.3) #814
16.4.4 (2024-02-13)
Changed
- 🐞 Replaced chaining operator
?. with old school && (fixing node 12 failures) #812
16.4.3 (2024-02-12)
Changed
- Fixed processing of multiple files in
options.path #805
16.4.2 (2024-02-10)
Changed
16.4.1 (2024-01-24)
- Patch support for array as
path option #797
16.4.0 (2024-01-23)
- Add
error.code to error messages around .env.vault decryption handling #795
- Add ability to find
.env.vault file when filename(s) passed as an array #784
16.3.2 (2024-01-18)
Added
- Add debug message when no encoding set #735
Changed
- Fix output typing for
populate #792
- Use subarray instead of slice #793
16.3.1 (2023-06-17)
Added
- Add missing type definitions for
processEnv and DOTENV_KEY options. #756
16.3.0 (2023-06-16)
Added
- Optionally pass
DOTENV_KEY to options rather than relying on process.env.DOTENV_KEY. Defaults to process.env.DOTENV_KEY #754
16.2.0 (2023-06-15)
Added
- Optionally write to your own target object rather than
process.env. Defaults to process.env. #753
- Add import type URL to types file #751
16.1.4 (2023-06-04)
Added
- Added
.github/ to .npmignore #747
16.1.3 (2023-05-31)
Removed
- Removed
browser keys for path, os, and crypto in package.json. These were set to false incorrectly as of 16.1. Instead, if using dotenv on the front-end make sure to include polyfills for path, os, and crypto. node-polyfill-webpack-plugin provides these.
16.1.2 (2023-05-31)
Changed
- Exposed private function
_configDotenv as configDotenv. #744
16.1.1 (2023-05-30)
Added
- Added type definition for
decrypt function
Changed
- Fixed
{crypto: false} in packageJson.browser
16.1.0 (2023-05-30)
Added
- Add
populate convenience method #733
- Accept URL as path option #720
- Add dotenv to
npm fund command
- Spanish language README #698
- Add
.env.vault support. 🎉 (#730)
ℹ️ .env.vault extends the .env file format standard with a localized encrypted vault file. Package it securely with your production code deploys. It's cloud agnostic so that you can deploy your secrets anywhere – without risky third-party integrations. read more
Changed
- Fixed "cannot resolve 'fs'" error on tools like Replit #693
16.0.3 (2022-09-29)
Changed
- Added library version to debug logs (#682)
16.0.2 (2022-08-30)
Added
- Export
env-options.js and cli-options.js in package.json for use with downstream dotenv-expand module
16.0.1 (2022-05-10)
Changed
- Minor README clarifications
- Development ONLY: updated devDependencies as recommended for development only security risks (#658)
16.0.0 (2022-02-02)
Added
- Breaking: Backtick support 🎉 (#615)
If you had values containing the backtick character, please quote those values with either single or double quotes.
15.0.1 (2022-02-02)
Changed
- Properly parse empty single or double quoted values 🐞 (#614)
15.0.0 (2022-01-31)
v15.0.0 is a major new release with some important breaking changes.
Added
- Breaking: Multiline parsing support (just works. no need for the flag.)
Changed
- Breaking:
# marks the beginning of a comment (UNLESS the value is wrapped in quotes. Please update your .env files to wrap in quotes any values containing #. For example: SECRET_HASH="something-with-a-#-hash").
..Understandably, (as some teams have noted) this is tedious to do across the entire team. To make it less tedious, we recommend using dotenv cli going forward. It's an optional plugin that will keep your .env files in sync between machines, environments, or team members.
Removed
- Breaking: Remove multiline option (just works out of the box now. no need for the flag.)
14.3.2 (2022-01-25)
Changed
- Preserve backwards compatibility on values containing
# 🐞 (#603)
14.3.1 (2022-01-25)
Changed
- Preserve backwards compatibility on exports by re-introducing the prior in-place exports 🐞 (#606)
14.3.0 (2022-01-24)
Added
- Add
multiline option 🎉 (#486)
14.2.0 (2022-01-17)
Added
- Add
dotenv_config_override cli option
- Add
DOTENV_CONFIG_OVERRIDE command line env option
14.1.1 (2022-01-17)
Added
- Add React gotcha to FAQ on README
14.1.0 (2022-01-17)
Added
- Add
override option 🎉 (#595)
14.0.1 (2022-01-16)
Added
- Log error on failure to load
.env file (#594)
14.0.0 (2022-01-16)
Added
- Breaking: Support inline comments for the parser 🎉 (#568)
13.0.1 (2022-01-16)
Changed
- Hide comments and newlines from debug output (#404)
13.0.0 (2022-01-16)
Added
- Breaking: Add type file for
config.js (#539)
12.0.4 (2022-01-16)
Changed
- README updates
- Minor order adjustment to package json format
12.0.3 (2022-01-15)
Changed
- Simplified jsdoc for consistency across editors
12.0.2 (2022-01-15)
Changed
- Improve embedded jsdoc type documentation
12.0.1 (2022-01-15)
Changed
- README updates and clarifications
12.0.0 (2022-01-15)
Removed
- Breaking: drop support for Flow static type checker (#584)
Changed
- Move types/index.d.ts to lib/main.d.ts (#585)
- Typescript cleanup (#587)
- Explicit typescript inclusion in package.json (#566)
11.0.0 (2022-01-11)
Changed
- Breaking: drop support for Node v10 (#558)
- Patch debug option (#550)
10.0.0 (2021-05-20)
Added
- Add generic support to parse function
- Allow for import "dotenv/config.js"
- Add support to resolve home directory in path via ~
9.0.2 (2021-05-10)
Changed
- Support windows newlines with debug mode
9.0.1 (2021-05-08)
Changed
9.0.0 (2021-05-05)
Changed
- Breaking: drop support for Node v8
8.6.0 (2021-05-05)
Added
- define package.json in exports
8.5.1 (2021-05-05)
Changed
- updated dev dependencies via npm audit
8.5.0 (2021-05-05)
Added
- allow for
import "dotenv/config"
8.4.0 (2021-05-05)
Changed
- point to exact types file to work with VS Code
8.3.0 (2021-05-05)
Changed
- Breaking: drop support for Node v8 (mistake to be released as minor bump. later bumped to 9.0.0. see above.)
8.2.0 (2019-10-16)
Added
8.1.0 (2019-08-18)
Changed
- Breaking: drop support for Node v6 (#392)
8.0.0 (2019-05-02)
Changed
- Breaking: drop support for Node v6 (#302)
7.0.0 - 2019-03-12
Fixed
- Fix removing unbalanced quotes (#376)
Removed
- Removed
load alias for config for consistency throughout code and documentation.
6.2.0 - 2018-12-03
Added
- Support preload configuration via environment variables (#351)
6.1.0 - 2018-10-08
Added
debug option for config and parse methods will turn on logging
6.0.0 - 2018-06-02
Changed
- Breaking: drop support for Node v4 (#304)
5.0.0 - 2018-01-29
Added
- Testing against Node v8 and v9
- Documentation on trim behavior of values
- Documentation on how to use with
import
Changed
- Breaking: default
path is now path.resolve(process.cwd(), '.env')
- Breaking: does not write over keys already in
process.env if the key has a falsy value
- using
const and let instead of var
Removed
4.0.0 - 2016-12-23
Changed
- Return Object with parsed content or error instead of false (#165).
Removed
verbose option removed in favor of returning result.
3.0.0 - 2016-12-20
Added
verbose option will log any error messages. Off by default.
- parses email addresses correctly
- allow importing config method directly in ES6
Changed
- Suppress error messages by default (#154)
- Ignoring more files for NPM to make package download smaller
Fixed
- False positive test due to case-sensitive variable (#124)
Removed
silent option removed in favor of verbose
2.0.0 - 2016-01-20
Added
Changed
- README has shorter description not referencing ruby gem since we don't have or want feature parity
Removed
- Variable expansion and escaping so environment variables are encouraged to be fully orthogonal
1.2.0 - 2015-06-20
Added
- Preload hook to require dotenv without including it in your code
Changed
- clarified license to be "BSD-2-Clause" in
package.json
Fixed
- retain spaces in string vars
1.1.0 - 2015-03-31
Added
- Silent option to silence
console.log when .env missing
1.0.0 - 2015-03-13
Removed
- support for multiple
.env files. should always use one .env file for the current environment