Crates.io | eenv |
lib.rs | eenv |
version | 0.1.2 |
created_at | 2025-09-17 10:22:49.359155+00 |
updated_at | 2025-09-18 08:18:35.449894+00 |
description | Encrypted Env Manager: encrypts .env files, manages examples, and enforces safety via git hooks. |
homepage | https://github.com/KiterationLabs/eenv |
repository | https://github.com/KiterationLabs/eenv |
max_upload_size | |
id | 1843057 |
size | 162,146 |
Encrypted Env Manager
EENV keeps secrets safe and dev-friendly:
.env* → .env*.enc
with XChaCha20-Poly1305 (single shared key)..env*
files..env*.example
skeletons automatically.Active Development
EENV is still under active development.
I’ll do my best to minimize breaking changes, and when they are unavoidable, I’ll announce them ahead of time and specify the release where they’ll occur.
Feedback
Suggestions, issues, and ideas for improvements are very welcome! Please open an issue or discussion in the repo if you’d like to contribute.
cargo install eenv
The binary is
eenv
.
In a repo that has .env
files:
# one-time setup: installs hook, fixes .gitignore, ensures config, generates examples, encrypts
eenv init
First time on a new machine (only .enc
files exist), run eenv init
and enter the shared key to decrypt.
eenv init
.env*.enc
exist:
eenv.config.json
, decrypts to plaintext without clobbering existing files..env*
exist:
.env*.example
..gitignore
(keeps examples & .enc
, ignores real .env*
and eenv.config.json
)..env* → .env*.enc
.eenv pre-commit [--write]
.env*
(except *.example
/ *.enc
).--write
:
.env*.example
..gitignore
if needed.eenv.config.json
exists/valid..env* → .env*.enc
and git add
s produced artifacts.eenv hook install [--force]
git config core.hooksPath
).--force
will overwrite a non-EENV hook (backs it up first).eenv hook uninstall [--force]
--force
removes the hook file even if it didn’t come from EENV.(There’s also a small demo greet
command.)
eenv init
git add .env*.enc .env*.example .gitignore
git commit -m "Set up EENV"
eenv init # enter the shared key when prompted
# now you have decrypted .env files locally (without clobbering existing ones)
.env*
in the index.eenv pre-commit --write
(or rely on the hook if you configured it to call with --write
).eenv.config.json
(ignored by git).eenv.config.json
with the new key and run eenv pre-commit --write
.# remove the hook
eenv hook uninstall # or: eenv hook uninstall --force
(This does not delete your .enc
files or config.)
Git GUI/clients (e.g., GitHub Desktop)?
If they respect Git hooks (most do when the hook files are in the repo’s hooks path), the EENV pre-commit will run. EENV installs into whatever git rev-parse --git-path hooks
returns, so it works with custom core.hooksPath
too.
“unrecognized subcommand 'PreCommit'”
Use kebab-case: eenv pre-commit
(Clap maps PreCommit
→ pre-commit
).