direnv for Per-Directory Env Vars

direnv loads .envrc on cd.

Setup

direnv is a tool that automatically loads environment variables when entering a directory. Each project's environment becomes self-contained; the engineer's shell does not pollute across projects; the discipline is per-project environment management.

What setup looks like:

Setup is bounded. The first project takes a few minutes; subsequent projects are fast.

Safety

direnv has explicit safety. Each .envrc must be approved; cloned repos do not auto-execute their .envrc; the engineer's environment is protected from arbitrary code.

The safety model is the discipline. The team trusts direnv because it requires explicit approval.

Scope

The scope is per-project. Each project has its own variables; entering one project does not contaminate another; the discipline is clean.

direnv for env vars is one of those engineering tooling disciplines that pays off in cleaner workflows. Nova AI Ops integrates with development tooling, surfaces patterns, and supports the team's per-project environment discipline.