← Catalog

pi-direnv

Auto-load direnv environment at session start — ensures bash commands have project-specific env vars from .envrc

Extension

Install

Install with PiG

pig install npm:pi-direnv

Install with Pi

pi install npm:pi-direnv
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

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:

  1. Checks if direnv is installed (skips silently if not)
  2. Searches for .envrc from cwd up to the git root
  3. Runs direnv export json and applies variables to process.env
  4. Shows a notification with the count of loaded vars
  5. Warns if .envrc is blocked (needs direnv 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.