zi jie liu
This is exactly the kind of thing runtime guardrails are for. I'm making Failproof AI, use policies to block access to sensitive files like .env before the agent ever gets to execute the read. It's completely open source just check out the repo of Failproof AI. Hit the star also if helpful :)
This is exactly the tool our team has been missing. Constantly forgetting to update .env.example has caused so many onboarding issues for new devs. Adding gen-envex to dev scripts is such a clean fix, appreciate you open-sourcing this! Such a clever solution to a trivial yet annoying problem. Preserving comments and line order while stripping secrets is perfect. Will install it immediately for all my Next.js projects. Great write-up too!