How the .env File Generator Works
AnyTool generates and edits .env files entirely in the browser. Existing files are parsed with dotenv.parse (the spec-correct parser that handles quoting, multiline values, and the export prefix), while a parallel line model preserves comments and key order for faithful regeneration. Validation flags duplicate keys, empty values, and invalid names, and optional required-vars schema checks use AJV. A .env.example is produced by stripping values to placeholders. The same model exports to .env, JSON, YAML, Docker, and shell, with K8s Secret values base64-encoded locally. Nothing — including secrets — is ever uploaded.
- dotenv.parse for spec-correct .env parsing
- Comment and key-order preservation
- Validation (dupes/empties/invalid keys) + optional AJV schema
- .env.example generation and multi-format export
- Secret masking and leak heuristics; no upload
