Monorepo Support
In monorepos with multiple applications and shared packages, environment variables are often used across folder boundaries. dotenv-diff supports this by allowing you to extend the scan scope to include shared folders while still running from a single app.
Scanning Shared Packages
By default, dotenv-diff scans the current working directory. In a monorepo, you can include
shared packages or libraries using the --include-files flag.
What This Does
- Scans the current application.
- Includes shared packages from the monorepo.
- Detects environment variable usage across app and shared code.
- Ignores variables used only in specific runtime environments.
Using a Configuration File
For larger monorepos, it is often cleaner to move shared configuration into a dotenv-diff.config.json file.
Why This Matters in Monorepos
- Unused or undocumented variables are harder to detect across apps.
- Keeping
.env.exampleaccurate becomes more complex at scale.
← Expiration Warnings Next →