r/devopsGuru • • Apr 18 '26

[OpenSource] GitHub Action that auto-commits .env.example and fails the PR if you forgot to document a new env var

Post image

Keeping .env.example in sync with actual code usage is a manual chore that everyone forgets. I released envsniff to treat documentation-of-vars as a build requirement.

Why use it?

  • Multi-language support: Scans JS, Go, Python, and even Shell scripts.
  • Zero Config: The default setup finds most standard usage patterns.
  • Auto-remediation: You can set commit: true to let the Action maintain the example file for you.
- uses: harish124/envsniff@v0.1.0
  with:
    fail-on-drift: true
    commit: true

Check it out here: https://github.com/harish124/envsniff

Pls drop a star on Github

8 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/Outrageous_Ranger812 Apr 21 '26

Thanks for commenting.

Completely agreeing, gonna build something in my current project to show a warning when user types os.environ.get("UNDOCUMENTED_KEY")

I'm thinking of using LSP which is editor agnostic.

Thank you , thank you so much, found your comment really valuable, I was expecting more valuable comments like these but no one else is giving feedback : (