Back to overview
Feature
Safe .env.example
Creates a clean .env.example – variable names only, no real values.
Your team needs a template of which variables must be set – but never the real values. Env Clinic builds that template for you, automatically and safely.
What it does
Env Clinic reads the variable names from your .env files and writes a .env.example with clear placeholders. Real values are never copied – only the names.
Why it matters
A well-kept .env.example makes onboarding easy and stops anyone from accidentally copying real secrets into the template. It is the only .env file that belongs in the repo.
How to use it
One flag creates or updates the file. Existing comments are kept, missing keys are added.
env-clinic scan . --write-env-example
- Names only, never real values
- Keeps existing comments
- Adds missing variables