| Crates.io | genenvsample |
| lib.rs | genenvsample |
| version | 0.2.0 |
| created_at | 2025-09-19 05:39:33.418446+00 |
| updated_at | 2025-10-01 15:19:01.488886+00 |
| description | Generate .env.example from .env |
| homepage | |
| repository | https://github.com/aasishraj/genenvsample-rust |
| max_upload_size | |
| id | 1845823 |
| size | 10,945 |
A simple Rust CLI tool to generate .env.example files from existing .env files.
This tool reads your .env file and creates a corresponding .env.example file with placeholder values instead of actual secrets. It preserves comments and empty lines while converting environment variable names into descriptive placeholders.
genenvsample <input> <output>
<input>: Path to your .env file<output>: Path where the .env.example file will be createdgenenvsample .env .env.example
This will read .env and create .env.example with placeholder values.
The tool converts environment variable names into placeholder values:
DATABASE_URL=postgres://... becomes DATABASE_URL=your-database-urlAPI_KEY=secret123 becomes API_KEY=your-api-keyCargo install:
cargo install genenvsample
Build from source:
cargo build --release
The binary will be available at target/release/genenvsample.
MIT