You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ dotenv run -- node index.js
◇ injected env (2) from .env
Hello Dotenv
NEW: Dotenv now has a fast parser thanks to @homanp of superagent.sh. Pass config({ fast: true }), flag --fast, or set DOTENV_FAST=true to opt-in to ~2x faster character-scanner parser. (#1010)
$ dotenv run --fast -- node index.js
◇ injected env (2) from .env
Hello Dotenv
Changed
Injecting message sent to stderr rather than stdout and tips removed (#1037)
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)
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.
🙏 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.
Add additional security and configuration tips to the runtime log (#884)
Dim the tips text from the main injection information text
constTIPS=['🔐 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\'] }']
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().
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.
🐞 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
🐞 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
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.
ℹ️ .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
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.)
Next steps: Take a moment to review the security alert above. Review
the linked package source code to understand the potential risk. Ensure the
package is not malicious before proceeding. If you're unsure how to proceed,
reach out to your security team or ask the Socket team for help at
support@socket.dev.
Suggestion: Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.
Mark the package as acceptable risk. To ignore this alert only
in this pull request, reply with the comment
@SocketSecurity ignore npm/dotenv@18.0.1. You can
also ignore all packages with @SocketSecurity ignore-all.
To ignore an alert for all future pull requests, use Socket's Dashboard to
change the triage state of this alert.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^8.6.0→^18.0.0Release Notes
motdotla/dotenv (dotenv)
v18.0.1Compare Source
Changed
v18.0.0Compare Source
Added
config({ fast: true }), flag--fast, or setDOTENV_FAST=trueto opt-in to ~2x faster character-scanner parser. (#1010)Changed
Removed
dotenv run -- your-command(#1035)v17.4.2Compare Source
Changed
v17.4.1Compare Source
Changed
injectingtoinjected(#1005)v17.4.0Compare Source
Added
skills/folder with focused agent skills:skills/dotenv/SKILL.md(core usage) andskills/dotenvx/SKILL.md(encryption, multiple environments, variable expansion) for AI coding agent discovery via the skills.sh ecosystem (npx skills add motdotla/dotenv)Changed
◇ injecting env (14) from .env(#1003)v17.3.1Compare Source
Changed
v17.3.0Compare Source
Added
Changed
v17.2.4Compare Source
Changed
DotenvPopulateInputacceptNodeJS.ProcessEnvtype (#915)v17.2.3Compare Source
Changed
v17.2.2Compare Source
Added
v17.2.1Compare Source
Changed
v17.2.0Compare Source
Added
DOTENV_CONFIG_QUIET=truein your environment or.envfile to quiet the runtime log (#889)DOTENV_CONFIG_environment variables take precedence over any code set options like({quiet: false})v17.1.0Compare Source
Added
v17.0.1Compare Source
Changed
v17.0.0Compare Source
Changed
quietto false - informational (file and keys count) runtime log message shows by default (#875)v16.6.1Compare Source
Changed
quietto true – hiding the runtime log message (#874)config({ quiet: true })to suppress.require('dotenv').config()forrequire('@dotenvx/dotenvx').config().v16.6.0Compare Source
Added
[dotenv@16.6.0] injecting env (1) from .env(#870){ quiet: true }to suppressv16.5.0Compare Source
Added
Changed
_logmethod. Use_debug#862v16.4.7Compare Source
Changed
.tapfolder when publishing. (oops, sorry about that everyone. - @motdotla) #848v16.4.6Compare Source
Changed
v16.4.5Compare Source
Changed
pathoption. return to historical behavior: do not attempt to auto find.envifpathset. (regression was introduced in16.4.3) #814v16.4.4Compare Source
Changed
?.with old school&&(fixing node 12 failures) #812v16.4.3Compare Source
Changed
pathoption. return to historical behavior: do not attempt to auto find.envifpathset. (regression was introduced in16.4.3) #814v16.4.2Compare Source
Changed
dotenvx.comv16.4.1Compare Source
pathoption #797v16.4.0Compare Source
error.codeto error messages around.env.vaultdecryption handling #795.env.vaultfile when filename(s) passed as an array #784v16.3.2Compare Source
Added
Changed
populate#792v16.3.1Compare Source
Added
processEnvandDOTENV_KEYoptions. #756v16.3.0Compare Source
Added
DOTENV_KEYto options rather than relying onprocess.env.DOTENV_KEY. Defaults toprocess.env.DOTENV_KEY#754v16.2.0Compare Source
Added
process.env. Defaults toprocess.env. #753v16.1.4Compare Source
Added
.github/to.npmignore#747v16.1.3Compare Source
Removed
browserkeys forpath,os, andcryptoin 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 forpath,os, andcrypto. node-polyfill-webpack-plugin provides these.v16.1.2Compare Source
Changed
_configDotenvasconfigDotenv. #744v16.1.1Compare Source
Added
decryptfunctionChanged
{crypto: false}inpackageJson.browserv16.1.0Compare Source
Added
populateconvenience method #733npm fundcommand.env.vaultsupport. 🎉 (#730)ℹ️
.env.vaultextends the.envfile 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 moreChanged
v16.0.3Compare Source
Changed
v16.0.2Compare Source
Added
env-options.jsandcli-options.jsin package.json for use with downstream dotenv-expand modulev16.0.1Compare Source
Changed
v16.0.0Compare Source
Added
If you had values containing the backtick character, please quote those values with either single or double quotes.
v15.0.1Compare Source
Changed
v15.0.0Compare Source
v15.0.0is a major new release with some important breaking changes.Added
Changed
#marks the beginning of a comment (UNLESS the value is wrapped in quotes. Please update your.envfiles 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
.envfiles in sync between machines, environments, or team members.Removed
v14.3.2Compare Source
Changed
#🐞 (#603)v14.3.1Compare Source
Changed
v14.3.0Compare Source
Added
multilineoption 🎉 (#486)v14.2.0Compare Source
Added
dotenv_config_overridecli optionDOTENV_CONFIG_OVERRIDEcommand line env optionv14.1.1Compare Source
Added
v14.1.0Compare Source
Added
overrideoption 🎉 (#595)v14.0.1Compare Source
Added
.envfile (#594)v14.0.0Compare Source
Added
v13.0.1Compare Source
Changed
v13.0.0Compare Source
Added
config.js(#539)v12.0.4Compare Source
Changed
v12.0.3Compare Source
Changed
v12.0.2Compare Source
Changed
v12.0.1Compare Source
Changed
v12.0.0Compare Source
Removed
Changed
v11.0.0Compare Source
Changed
v10.0.0Compare Source
Added
v9.0.2Compare Source
Changed
v9.0.1Compare Source
Changed
v9.0.0Compare Source
Changed
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.