EnvDoctor
ENV101+Complete User Guide
Scenarios

Scenario library: twelve EnvDoctor problems solved

From leaking production keys to missing staging config.

Scenario 1: Onboarding a new dev

cp .env.example; envdoctor diff; fill required; commit nothing secret.

Scenario 2: Leaked key in history

EnvDoctor flags ENV401; rotate key; purge; rerun to confirm clean.

Scenario 3: Renamed env var

Code updated but example stale; envdoctor catches diff; fix example; merge.

Scenario 4: Unused config cluttering

envdoctor check reveals ENV201 dead entries; delete them.

Scenario 5: Preview deploy fails

Missing DATABASE_URL; check report; add to preview env; rerun.

Scenario 6: CI gate failing on warning

Check severity; fix or adjust fail_on intentionally; never silently disable.

Scenario 7: Multiple env profiles drift

Profile per env; diff; align schemas; produce one master schema.

Scenario 8: Placeholder still in prod

ENV301; replace or remove; fix CI to catch next time.

Scenario 9: Recovered a repo with no example

EnvDoctor generate emits starter .env.example from code.

Scenario 10: False ENV201 noise

Libraryed dynamic key; add explicit schema or allow-list; document.

Scenario 11: Merge request debris

Two developers edited .env.example differently; diff shows conflicts; human resolves.

Scenario 12: Weekly audit

Nightly scan; issue count trending down; rotate off suspect values.