| Crates.io | envtricks |
| lib.rs | envtricks |
| version | 0.1.0 |
| created_at | 2025-12-16 18:33:48.404227+00 |
| updated_at | 2025-12-16 18:33:48.404227+00 |
| description | .env file manipulation utilities |
| homepage | |
| repository | https://github.com/intervinn/envtricks |
| max_upload_size | |
| id | 1988428 |
| size | 14,947 |
envtricks (envtricks) is a small set of helpful commands to work with .env files.
This project features powerful manipulation with selectively copying fields from one file to another, generating .env.example's and primitive commands for getting and setting values of fields, which is useful for shell scripts.
From source:
git clone https://github.com/intervinn/envtricks && cd envtricks && cargo install --path .
Run envtricks help to view similar information.
envtricks movesource, destination, fields-a (--all)Copies fields of source into destination, keeping all of destination fields that weren't present in source.
If -a is present and fields is empty, all fields all fields of source are copied into destination
If -a is present and fields if present, all fields except for the ones present in fields are copied into destination
If the destination file doesn't exist, it gets automatically created.
Examples:
envtricks move -a .env .env.prod - move all fields of .env into .env.prod, create .env.prod if doesn't exist.
envtricks move -a .env .env.prod SECRET SOMETHING - move all fields of .env into .env.prod, EXCEPT for SECRET and SOMETHING
envtricks move .env .env.prod SECRET SOMETHING - move ONLY SECRET and SOMETHING from .env into .env.prod
envtricks examplesource, destinationCreate or overwrite destination, containing source with empty values.
envtricks setsource, key, valueSet key to value in source
envtricks getsource, keyWrites value of key to stdout.
envtricks removesource, fieldsRemoves values of fields in source