1 unstable release
| 0.1.0 | Jul 17, 2025 |
|---|
#1536 in Command line utilities
6KB
Envinator
A simple CLI tool that generates .env.example files from .env files by stripping out sensitive values while preserving the structure and comments.
Installation
cargo install envinator
Usage
# Generate .env.example from .env (default)
envinator
# Specify input and output files
envinator .env.production .env.production.example
# Show help
envinator --help
Example
Given a .env file:
# Database configuration
DATABASE_URL=postgres://user:password@localhost:5432/mydb
DB_HOST=localhost
DB_PORT=5432
# API Keys
API_KEY=sk-1234567890abcdef
Running envinator will generate .env.example:
# Database configuration
DATABASE_URL=
DB_HOST=
DB_PORT=
# API Keys
API_KEY=
Features
- Preserves comments and empty lines
- Strips all values while keeping keys
- Simple and fast
- No external dependencies beyond CLI parsing
License
MIT
Dependencies
~1.1–1.7MB
~31K SLoC