dotenv-linter
Linting dotenv files like a charm!
Decision gist · record as of 2026-08-14
Yes. dotenv-linter is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—catching `.env` file mistakes that are easy to overlook. It's lightweight, integrates well with pre-commit workflows, and is suitable for teams that want to enforce consistency in environment configuration files.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later (supports up to 3.14).
- Low install friction with a pure Python wheel and five lightweight dependencies (attrs, click, click_default_group, lark, typing_extensions).
- Active maintenance with a release 14 days ago and recent commits.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2026-07-31 (14 days) · last repo commit 2026-08-13 · 305 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 172,774 downloads/mo, #10,326 on PyPI
Alternatives
Verify before relying
pip install dotenv-linter
dotenv-linter .env .env.template- Whether the linter's rule set covers all common `.env` anti-patterns beyond the documented examples.
- Performance characteristics when linting very large `.env` files or many files in a single run.
- How pre-commit hook integration handles exit codes and failure reporting in CI/CD pipelines.
What it is and what it does
dotenv-linter is a command-line tool that checks `.env` files for consistency and adherence to best practices. It detects problems like leading whitespace, improper spacing around equals signs, unnecessary quotes, duplicate keys, and non-uppercase variable names—issues that are easy to miss in simple text files but can cause subtle bugs or configuration errors.
The tool is designed to integrate into existing workflows, including as a pre-commit hook. It depends on a small set of libraries: attrs for data structures, click for CLI scaffolding, lark for parsing, and typing_extensions for type hints. The project is actively maintained and supports modern Python versions from 3.10 onward.
Use it for
- Enforce naming conventions (UPPER_CASE) and formatting rules across team `.env` files in a shared project.
- Catch duplicate environment variable definitions before they cause configuration conflicts in production.
- Validate `.env.template` files alongside actual `.env` files to ensure consistency between template and implementation.
- Integrate into CI/CD pipelines via pre-commit hooks to prevent malformed `.env` files from being committed.
- Audit existing `.env` files in legacy projects to identify and fix accumulated formatting and consistency issues.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
dotenv-linter is actively maintained, has no known vulnerabilities, low install friction, and solves a real problem—catching `.env` file mistakes that are easy to overlook. It's lightweight, integrates well with pre-commit workflows, and is suitable for teams that want to enforce consistency in environment configuration files.
Install
dotenv-linter on PyPI
Before you install
Low install friction with a pure Python wheel and five lightweight dependencies (attrs, click, click_default_group, lark, typing_extensions). Active maintenance with a release 14 days ago and recent commits.
Requires Python 3.10 or later (supports up to 3.14).
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install dotenv-linter
dotenv-linter .env .env.template
Verify before relying
- Whether the linter's rule set covers all common `.env` anti-patterns beyond the documented examples.
- Performance characteristics when linting very large `.env` files or many files in a single run.
- How pre-commit hook integration handles exit codes and failure reporting in CI/CD pipelines.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesattrsclickclick_default_grouplarktyping_extensions |
| Maintenance | Actively maintained 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 172,774 / month, #10,326 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality Assurance |
Evidence: dotenv_linter-0.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “env file linter”
- dotenv-linterLints `.env` files for consistency violations and best practices,…
- load-dotenvAutomatically loads environment variables from a .env file into your…
- dump-envGenerates .env files by merging an .env.template with environment…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also dump-env · gitlint-core · yamllint · rumdl · tclint · ick · wemake-python-styleguide · dotenv · python-dotenv · hadolint-coatl