Note
Dotenvx team made vscode plugin to do the same thing -> https://marketplace.visualstudio.com/items?itemName=dotenv.dotenvx-vscode&ssr=false#overview
An interactive CLI tool for managing your .env files with dotenvx. This tool provides a user-friendly interface for encrypting and decrypting environment files, as well as setting up precommit hooks.
This tool was created to simplify the process of working with dotenvx encryption and decryption. Instead of typing long commands or remembering specific syntax, you can quickly:
- Select which .env files to encrypt or decrypt through an interactive menu
- Avoid typing lengthy dotenvx commands manually
- Selectively encrypt or decrypt specific files when working with multiple .env files
- Set up precommit hooks with a single command
You can install this package globally:
npm install -g dotenvx-interactive-cli
Or use it directly with npx:
npx dotenvx-interactive-cli
- 🔒 Interactive encryption of .env files
- 🔓 Interactive decryption of .env files
- 🪝 Easy precommit hook installation
- ✨ User-friendly selection interface for multiple .env files
- 🔍 Automatic .env file detection
- ⚡ Validation of dotenvx installation and required files
- Navigate to your project directory where your .env files are located
- Run the CLI tool:
When installed globally:
dotenvx-interactive
or use npx:
npx dotenvx-interactive-cli
- Choose from the available options:
- Encrypt .env files
- Decrypt .env files
- Install precommit hook
- Exit
- A
.env.keys
file must be present in your project directory - dotenvx must be installed globally
MIT
Contributions, issues, and feature requests are welcome!