Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
cooler-env
Advanced tools
CLI + module utility to help you manage your environment variables better. Inspired by Ruby on Rails credentials.
Cooler-Env is a CLI + module utility to help you manage your environment variables better. It is inspired by Ruby on Rails credentials, and operates similarly.
The point of Cooler-Env is to drastically reduce the amount of time a sensitive plain-text key is visible and to provide an intuitive interface to manage keys.
Cooler-Env is a CLI utility and a module for use in your project.
NPM
npm install cooler-env
Yarn
yarn add cooler-env
To set up a project for the first time with Cooler-Env you will need to perform an init. Here is a sample command:
cooler-env init -e development
This command will set up two files - a .enc file and a .key file. The .enc file is an encrypted binary containing all of your keys that can be safely committed to version control. The .key file is your secret key file that is used to decrypt the binary file.
WARNING: DO NOT CHECK THE .KEY FILE INTO VERSION CONTROL OTHERWISE YOUR KEYS CAN BE DECRYPTED AND EXPOSED.
When you're ready to add a new environment variable key you can use this command. It will open up an interactive interface to create a key and a value. Here is a sample command:
cooler-env add -e development
When you need to change an environment variable key you can use this command. It will open up an interactive interface to select a key to edit and to provide a new value for it. Here is a sample command:
cooler-env edit -e development
When you need to delete an environment variable key you can use this command. It will open up an interactive interface to select a key to delete. Here is a sample command:
cooler-env delete -e development
Cooler-Env comes with a helper function called loadEnv
that is meant to load all of your environment variables into process.env
and return a promise. You will use this function in your application's code before using any of the environment variables.
This function takes two arguments: the first is your application's environment (usually passing process.env.NODE_ENV
), and the second is optionally adding the directory path you want to use for your encryption key and encrypted files. This will default to "config".
Sample usage:
import { loadEnv } from "cooler-env/dist/loadEnv";
// Example IIFE async function
(async () => {
await loadEnv(process.env.NODE_ENV);
})();
FAQs
CLI + module utility to help you manage your environment variables better. Inspired by Ruby on Rails credentials.
The npm package cooler-env receives a total of 0 weekly downloads. As such, cooler-env popularity was classified as not popular.
We found that cooler-env demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.