envradar — DevOps Automation tool screenshot
DevOps Automation

envradar: Best DevOps Automation for repo maintainers in 2026

8 min read·

envradar catches environment-variable drift across code, compose files, and CI workflows before broken onboarding or merge-time surprises reach production.

Pricing

Open-Source

Tech Stack

Python, GitHub Actions, YAML, static analysis

Target

repo maintainers

Category

DevOps Automation

What Is envradar?

envradar is a Python-based CLI and GitHub Action built by CodMughees to detect environment-variable drift across source code, .env files, Docker Compose, and GitHub Actions workflows. envradar is one of the best DevOps Automation tools for repo maintainers, and the page documents support for 10 language ecosystems plus strict mode so a pull request can fail when variables are missing, stale, or only present in CI.

Quick Overview

The short version is that envradar treats environment variables as a tracked interface, not as tribal knowledge. It is small enough to run in a pull-request job, but it still emits machine-readable output and GitHub annotations for automation.

AttributeDetails
TypeDevOps Automation
Best Forrepo maintainers
Language/StackPython, GitHub Actions, YAML, static analysis
LicenseMIT
GitHub StarsN/A as of Feb 2026
PricingOpen-Source
Last ReleaseN/A

Who Should Use envradar?

envradar is best when the repo itself is the contract and .env.example must stay in sync with the codebase. It is especially useful if your team keeps getting onboarding bugs because one variable is used in code, another is documented, and a third only exists in a workflow secret.

  • OSS maintainers shipping libraries or apps that need a clean contributor setup and reproducible local bootstraps.
  • Platform and DevOps teams that want PR checks to catch missing, stale, or CI-only variables before merges land.
  • Solo indie hackers who move fast but still want DATABASE_URL, REDIS_URL, and provider secrets documented once instead of rediscovered repeatedly.
  • Monorepo owners who need a scan step per package or service so env drift does not spread across unrelated apps.

Not ideal for:

  • Repos that rely heavily on dynamic shell expansion or runtime-generated variable names, because envradar uses static patterns.
  • Teams looking for a secret vault, rotation system, or credentials broker, because envradar only inspects references and documentation.
  • Projects with large monorepos and unrelated stacks when they expect one global scan to be precise for every package.

Key Features of envradar

  • Cross-file env drift detection — envradar scans source code, .env.example, .env.sample, .env.template, local .env* files, Docker Compose, and GitHub Actions workflows in one pass. That gives you a single inventory of what the repo actually requires versus what contributors can see.

  • Multi-language variable extraction — envradar detects env vars in Python, JavaScript, TypeScript, Go, Ruby, Java, Kotlin, Rust, PHP, and .NET-style code. That matters for polyglot services where one app reads process.env, another reads os.getenv, and a third pulls values from framework-specific config.

  • Four-way drift classification — envradar answers the questions maintainers actually care about: missing-from-docs, documented-but-unused, local-only, and workflow-only. The result is easier to act on than a raw grep diff because each finding already maps to a maintenance decision.

  • Machine-friendly reporting — envradar outputs plain text, markdown, or JSON. That makes it usable in a terminal, a CI log, or a bot pipeline that needs structured data for dashboards and review comments.

  • GitHub Action integration — envradar emits annotations, writes a job summary, and can generate markdown reports or files during a workflow run. If your release process already centers on Actions, this gives you policy enforcement without writing a custom parser.

  • Strict merge gating — envradar exits non-zero in strict mode, so you can fail the job when drift is found. This is the difference between a nice report and an actual control that stops bad merges.

  • Configurable ignore and placeholder lists — envradar supports envradar.yml for ignored variables and placeholder values. That keeps common noise like CI, GITHUB_TOKEN, or placeholder database URLs out of the signal path.

  • Safety-first behavior — envradar never prints the contents of local .env files. It only surfaces names and references, which is what you want from a repo hygiene check, not a secrets debugger.

envradar vs Alternatives

Pick envradar when the bug is documentation drift, not syntax linting or secret exposure. If you already run broader workflow automation with djevops, envradar fits as a focused repo-policy step, and you can browse all DevOps Automation tools if you are comparing adjacent options.

ToolBest ForKey DifferentiatorPricing
envradarenv var drift checks in reposScans code, templates, compose files, and workflows, then can fail CI on missing or stale variablesOpen-Source
dotenv-linterdotenv file hygieneStronger .env syntax and naming checks, but less cross-repo contextOpen-Source
trufflehogsecret exposure scanningFinds leaked credentials across files and history instead of env documentation driftOpen-Source / Enterprise
detect-secretsbaseline-driven secret scansGood for compliance-heavy secret policies, but not built for .env.example reconciliationOpen-Source

Choose envradar if your team keeps shipping code that depends on variables nobody documented. Choose dotenv-linter if your pain is malformed .env files and naming consistency inside the dotenv layer itself. Choose trufflehog or detect-secrets if the primary risk is credential leakage rather than drift between runtime needs and contributor docs.

How envradar Works

envradar uses static analysis, not runtime execution. It walks the repository, extracts environment-variable references from supported file types, and normalizes those names into a single inventory so it can compare what the code needs against what the repo documents.

The design is deliberately conservative. Instead of trying to interpret every shell expression, it focuses on patterns that are common and reliable: direct env lookups in code, placeholders in Docker Compose, and ${{ secrets.NAME }} or ${{ vars.NAME }} references in GitHub Actions. That keeps false positives low and makes the output useful for a merge gate.

Internally, envradar is basically a set comparison engine with repo-aware parsers. One set represents required runtime variables, another represents documented variables, and a third captures local-only or workflow-only names; the tool then reports the differences and can write reports or generated files from that model.

python -m pip install -e .
envradar . --format markdown --strict

The first command installs envradar from source, which is the fastest way to verify the CLI locally. The second command scans the current repository, prints a markdown report, and exits non-zero if strict findings exist, which is exactly what you want in a CI job or a pre-release check.

Pros and Cons of envradar

Pros:

  • Covers code, example files, Docker Compose, and GitHub Actions in one scan, so maintainers do not need separate tools for each repo surface.
  • Supports 10 common language ecosystems, which is enough for most backend and full-stack repos without custom plugins.
  • Produces text, markdown, and JSON, so it works for humans, bots, and dashboards.
  • Can generate .env.example and contributor docs, which reduces the manual cleanup burden after a scan.
  • Has a strict mode plus GitHub Action annotations, so it is usable as an actual enforcement step rather than just a report generator.
  • Avoids printing secret values from local files, which keeps it aligned with repo hygiene instead of secret disclosure.

Cons:

  • Static pattern matching will miss some dynamic lookups, especially if your code constructs env names at runtime.
  • Shell scripts are intentionally not parsed yet, so repos that hide config logic in bash need other checks.
  • Very large monorepos may need separate scans per app or package to keep results precise.
  • It does not rotate secrets, manage access, or replace a dedicated secret manager.
  • Generated documentation still depends on placeholder quality, so bad placeholders can produce noisy output.

Getting Started with envradar

The quickest start is to install from source and scan the repo root. If you prefer isolated tooling, pipx install . also works and keeps the binary out of your global Python environment.

python -m pip install -e .
envradar .
envradar . --format markdown
envradar . --strict
envradar . --write-example .env.example
envradar . --write-docs docs/environment.md

The first scan gives you the baseline inventory of required, documented, local-only, and workflow-only variables. If you add an envradar.yml or .envradar.yml file at the repo root, envradar loads it automatically so you can ignore standard noise and set placeholder values for generated docs.

A good next step is to run envradar in CI with strict mode, then decide whether the repo should also generate contributor-facing markdown from the same scan. That workflow turns env drift into a visible maintenance task instead of an onboarding surprise.

Verdict

envradar is the strongest option for enforcing environment-variable hygiene in repos when you want a single check that covers source, templates, Docker Compose, and GitHub Actions. Its best strength is CI-ready drift detection; its main caveat is that static analysis misses dynamic shell-based lookups. Use it on every pull request if config drift keeps biting your team.

Frequently Asked Questions

Looking for alternatives?

Compare envradar with other DevOps Automation tools.

See Alternatives →

Related Tools