pi-direnv
Auto-load direnv environment at session start — ensures bash commands have project-specific env vars from .envrc
Package details
Install pi-direnv from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-direnv- Package
pi-direnv- Version
0.1.0- Published
- Feb 24, 2026
- Downloads
- 23/mo · 7/wk
- Author
- emiller88
- License
- MIT
- Types
- extension
- Size
- 4.2 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-direnv
Auto-load direnv environment at session start. Ensures bash commands have project-specific env vars from .envrc files.
Install
pi install npm:pi-direnv
What it does
On session_start:
- Checks if
direnvis installed (skips silently if not) - Searches for
.envrcfrom cwd up to the git root - Runs
direnv export jsonand applies variables toprocess.env - Shows a notification with the count of loaded vars
- Warns if
.envrcis blocked (needsdirenv allow)
Why
Nix flakes + direnv is a common pattern. Without this extension, pi exec commands miss project-specific PATH entries, env vars, and tool versions defined in your flake's devShell.
Inspired by simonwjackson/opencode-direnv.