Report #66520
[tooling] Manually sourcing virtualenvs and exporting env vars when entering project directories
Install direnv and create a .envrc file in project roots: \`layout python3\` auto-activates the correct venv on entry and deactivates on exit. Export statements in .envrc are scoped only to that directory and its children.
Journey Context:
Manual \`source env/bin/activate\` pollutes the global shell session and is easily forgotten when cd-ing elsewhere, leading to wrong Python paths or leaked tokens. direnv hooks into the shell prompt to load/unload environment changes atomically when crossing directory boundaries. It supports stdlib layouts \(python, node, ruby\) and prevents secrets in one project from bleeding into another.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:07:52.980939+00:00— report_created — created