$ account purcell
envrc.el is an Emacs Lisp package that provides buffer-local environment variable management using the direnv tool. It implements a global minor mode (`envrc-global-mode`) that enables a local minor mode (`envrc-mode`) in every buffer, which sets buffer-local `process-environment`, `exec-path`, and related variables based on the nearest `.envrc` file. The package caches direnv results per directory, supports asynchronous direnv execution with configurable blocking behavior, and advises several Emacs shell commands (e.g., `shell-command`, `async-shell-command`, `org-babel-eval`) to propagate the local environment into temporary buffers. It also includes TRAMP support for remote files, a major mode for editing `.envrc` files, and a comprehensive test suite. The architecture is a single-file Emacs package with clean separation of concerns: environment detection, direnv process management, result caching, and application to buffer-local state. The code demonstrates advanced Emacs Lisp patterns including minor modes, process filters and sentinels, advice, and buffer-local variable management.