EnvBuddy is a simple and secure command-line tool for managing and encrypting .env
files. It helps developers protect sensitive environment variables by encrypting .env
files and easily decrypting them when necessary.
- Encrypt
.env
files to securely store sensitive information. - Decrypt encrypted
.env
files. - Supports AES encryption with a predefined key.
- Easy-to-use CLI with commands for encryption and decryption.
- Go 1.18 or higher
git clone https://github.com/alexrosepizant/envbuddy.git
cd envbuddy
Run the following command to install the required Go modules:
go mod tidy
To build the executable, run:
go build -o envbuddy main.go
This will generate an executable file called envbuddy
.
Create a .env file with the following content:
ENCRYPTION_KEY=myverystrongpasswordo32bitlength
After building the application, you can use the following commands.
To encrypt a .env
file, run:
./envbuddy encrypt <filename>
Example:
./envbuddy encrypt .env.sample
This will generate an encrypted file named .env.sample.encrypted
.
To decrypt an encrypted .env
file, run:
./envbuddy decrypt <filename>
Example:
./envbuddy decrypt .env.sample.encrypted
This will generate a decrypted .env.sample.decrypted
file.
Contributions are welcome! Feel free to fork the repository, submit issues, or create pull requests.
- Fork the repository
- Create a new branch (
git checkout -b feature-xyz
) - Commit your changes (
git commit -am 'Add feature xyz'
) - Push to the branch (
git push origin feature-xyz
) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.