Running AI agents in a repo full of .env files

Your agent needs this project's keys to run it. It doesn't need the .env files of every other project on your Mac, and the keys shouldn't leave for anywhere but their own service.

Download for MacFree for Claude Code

What your agent can and can't do with .env

.env files in the repo you're working inThe whole git repo counts, so every package in a monorepo is in
Allowed
.env.example and other templates
Allowed
.env files in other projects
Block
A key from .env sent to its own service
Allowed
A key from .env sent anywhere else, or hardcoded into a request
Block

Before it reaches git

The commit check stops a commit that puts a key where the code sends it out. Keep .env itself in .gitignore.

Put Muzzle between your agents and the internet

Download for Mac

Free · Apple Silicon · macOS 12 or later