
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
dotenvrc loads environment variables from a .envrc
file into process.env
.
In short, I wanted jest
to use environment variables written in a .envrc
.
At the writing moment, jest
seems to run in a sandboxed environment, i.e. it omits
runtime environment variables. Since I'm a big fan of The Twelve-Factor App and direnv,
I wanted to keep the single source of truth theory.
To have the same result of what direnv does in popular and/or realistic use cases.
In this sense, function
or shell command execution would be out of support.
export
export -n
(un-export)\xXX
: ASCII hex code\uXXXX
: 4 digits unicode\UXXXXXXXX
: 8 digits unicode\n
, \r
, \t
, \v
, \b
, \a
$VAR
${VAR}
$PWD
. $PWD
is expanded to the directory where .envrc
found.export
.
${#var}
, ${var:-val}
, etc.npm install dotenvrc
To inject .envrc
content into process.env
, simply:
require('dotenvrc');
If you have .env
file instead of .envrc
, the following might work for you. (It might not since the Parsing rules are different.)
require('dotenvrc/dotenv').inject()
.envrc
file# Firebase/GCP
export BOTO_CONFIG=$PWD/.boto
export GOOGLE_APPLICATION_CREDENTIALS=$PWD/secret/goog-credencials.json
# Cloud Datastore emulator
PORT=18081
export DATASTORE_EMULATOR_PORT=$PORT
export DATASTORE_EMULATOR_HOST=http://localhost:$PORT
MIT
FAQs
Read .envrc
The npm package dotenvrc receives a total of 1,006 weekly downloads. As such, dotenvrc popularity was classified as popular.
We found that dotenvrc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.