
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Environment Manager. CLI to manage environment variables. This tool was created to simplify working with multiple .env files across different projects and environments (development, staging, and local).
CLI to manage environment variables. This tool was created to simplify working with multiple .env files across different projects and environments (development, staging, and local).
To install the package, simply run:
pip install envm
Save the current environment file to the environments database. By default, it looks for a .env
file in the current directory.
Options:
--envfile
: Specify a different environment file name (default: .env
)--overwrite/--no-overwrite
: Overwrite existing environment if it exists (default: false)$ envm save users.dev
$ envm save users.dev --envfile .env.prod
$ envm save users.dev --overwrite
List all your saved environment files. Shows a count of total environments at the end.
$ envm ls
Create an environment file in the current directory from a saved environment. By default, it creates a .env
file.
Options:
--envfile
: Specify a different output file name (default: .env
)--overwrite/--no-overwrite
: Overwrite existing file if it exists (default: false)--direnv
: Generate .envrc
file for automatic environment loading with direnv$ envm use users.dev
$ envm use users.dev --envfile .env.prod
$ envm use users.dev --overwrite
$ envm use users.dev --direnv # Automatic environment loading
Delete a saved environment file. Use --force
to skip confirmation:
$ envm delete users.dev
$ envm delete users.dev --force
Enable autocompletion for your environment variable files
curl https://raw.githubusercontent.com/emmanueloctavi0/envm/refs/heads/main/src/completion/envm_complete.zsh >> ~/.zshrc
curl https://raw.githubusercontent.com/emmanueloctavi0/envm/refs/heads/main/src/completion/envm_complete.bash >> ~/.bashrc
For automatic loading/unloading of environment variables when entering/leaving directories, use the --direnv
flag with the use
command.
direnv automatically loads environment variables based on the current directory. Variables are loaded when you enter a directory and unloaded when you leave it.
# 1. Use envm with direnv integration
$ envm use users.dev --direnv
# If direnv is not installed, envm will show installation instructions
# If direnv is installed, it will:
# - Generate .envrc file
# - Ask if you want to run 'direnv allow' automatically
# 2. That's it! Environment variables now load automatically
$ cd /your/project # Variables loaded automatically
$ echo $DATABASE_URL # Variable is available
$ cd /another/project # Variables unloaded automatically
$ echo $DATABASE_URL # Variable no longer available
If you prefer to set up direnv manually:
Install direnv:
# Ubuntu/Debian
sudo apt install direnv
# macOS
brew install direnv
Add hook to your shell:
# Bash: Add to ~/.bashrc
eval "$(direnv hook bash)"
# Zsh: Add to ~/.zshrc
eval "$(direnv hook zsh)"
# Fish: Add to ~/.config/fish/config.fish
direnv hook fish | source
Restart your terminal and use:
$ envm use users.dev --direnv
$ direnv allow # If not done automatically
.envrc
files can be shared with your teamFAQs
Environment Manager. CLI to manage environment variables. This tool was created to simplify working with multiple .env files across different projects and environments (development, staging, and local).
We found that envm demonstrated a healthy version release cadence and project activity because the last version was released less than 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
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.