Linting dotenv files like a charm!
Actively maintained. Last release 4 months ago, commits in 26 of the last 26 weeks. A safe choice.
pip install dotenv-linterdotenv-linter
Simple linter for .env files.

While .env files are very simple it is required to keep them consistent.
This tool offers a wide range of consistency rules and best practices.
And it integrates perfectly to any existing workflow.
Read the announcing post.
Installation and usage
pip install dotenv-linter
And then run it:
dotenv-linter .env .env.template
See Usage section for more information.
Examples
There are many things that can go wrong in your .env files: