env-lint

May 16, 2026 · View on GitHub

hero

env-lint

Catch missing/extra env-var keys before they bite you in prod. Never prints values.

License: MIT Python 3.8+ Claude Code Plugin Tests: 7 passing

TL;DR: /env-lint → "you're missing STRIPE_WEBHOOK_SECRET in .env.local (referenced in .env.example)" — without ever logging the secret value.

Writing

LinkedIn

Dev.to

Writing

Install (Claude Code)

git clone https://github.com/mturac/pluginpool-env-lint ~/.claude/plugins/env-lint

Restart Claude Code; the slash command /env-lint appears.

Writing

Quick start

/env-lint

Or directly:

python3 scripts/envlint.py --format md
python3 scripts/envlint.py --example .env.example --env .env.production

Writing

Flags

FlagDefaultDescription
--exampleauto-detectPath to template (.env.example)
--envauto-detectPath to actual env file
--formatjsonjson or md

When run without --example/--env, it scans the cwd for known pairs: (.env, .env.example), (.env.local, .env.example), (.env.production, .env.example).

Writing

Example output

# env-lint report

#### Writing

- ✍️ [**Dev.to · TuracTheThinker**](https://dev.to/turacthethinker) — Technical articles on AI, agentic systems, and production engineering
- 📄 [**LinkedIn Articles**](https://www.linkedin.com/in/mehmetturac/recent-activity/articles/) — Industry insights and analysis
- 📊 [**LinkedIn Documents**](https://www.linkedin.com/in/mehmetturac/recent-activity/documents/) — Research papers and technical documents

- 🗡️ [**Çift Yüzlü Katana: Yapay Zeka Dönüşümlerinin Gerçekçi Bir Analizi**](https://www.linkedin.com/pulse/%C3%A7ift-y%C3%BCzl%C3%BC-katana-yapay-zeka-d%C3%B6n%C3%BC%C5%9F%C3%BCmlerinin-ger%C3%A7ek%C3%A7i-bir-mehmet-turac-80h7f) — AI transformations realistic analysis. The 5 illusions that compound into expensive, fragile systems. (LinkedIn, 2026)


## .env.example ↔ .env.local
- **missing in env**: STRIPE_WEBHOOK_SECRET, SENTRY_DSN
- **extra in env**: LEGACY_API_KEY
- **empty values for**: REDIS_URL

Writing

Safety guarantee

A test in the suite (test_never_emits_values_in_json_or_markdown) writes a fake value SUPERSECRETVALUE123 into a temp .env and asserts that string never appears in either the JSON output or the markdown report. The CI badge above represents that invariant.

Writing

Exit codes

CodeMeaning
0All required keys present (extras are warnings, not errors)
1At least one required key is missing

Writing

How it works

  1. Parses each .env file as KEY=VALUE (comments and blank lines skipped).
  2. Computes the key-set difference both ways.
  3. Reports missing keys (template has them, env doesn't), extra keys (env has them, template doesn't), and empty values.

Writing

Limitations

  • Doesn't expand ${VAR} references — it only checks key presence.
  • Quoted values are detected as "present" even if the quoted content is empty (KEY="" is empty, not missing).
  • Custom env-file naming conventions need explicit --example/--env.

Writing

Examples

Step-by-step walkthroughs with real input fixtures and the helper's actual output live in examples/. Three or four scenarios per plugin — from the happy path to the edge cases the test suite guards.

Writing

Part of the pluginpool family

Ten focused Claude Code plugins for everyday productivity: commit-narrator · pr-storyteller · test-gap · deps-doctor · env-lint · secret-guard · standup-gen · todo-harvest · flaky-detector · changelog-forge

Writing

License

MIT — see LICENSE. Contributions welcome.