pi-env-guard

Environment variable validation, secret leak detection, and drift analysis for pi.dev projects

Packages

Package details

extensionskill

Install pi-env-guard from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-env-guard
Package
pi-env-guard
Version
1.1.1
Published
Jun 25, 2026
Downloads
not available
Author
realvendex
License
MIT
Types
extension, skill
Size
28.7 KB
Dependencies
0 dependencies · 5 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ],
  "skills": [
    "./skills"
  ],
  "prompts": [],
  "themes": []
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-env-guard

Validate .env files, detect secret leaks, and check for environment drift in your Pi projects.

Installation

pi install npm:pi-env-guard

What It Does

Every developer uses .env files, but they're easy to mess up — missing variables, accidentally committed secrets, and .env.example files that drift out of sync. pi-env-guard adds three tools to Pi that catch these issues before they become problems.

Tools

env_validate

Validates your .env file against .env.example to find missing, extra, or misconfigured variables.

Parameters:

  • env_path (string, optional) — Path to .env file (default: .env)
  • example_path (string, optional) — Path to .env.example (default: .env.example)

Example:

Use the env_validate tool to check my environment configuration

env_leak_detect

Scans files for accidentally committed secrets like API keys, tokens, and passwords.

Parameters:

  • path (string, optional) — Directory or file to scan (default: current directory)
  • patterns (string[], optional) — Additional regex patterns to detect

Example:

Use the env_leak_detect tool to scan for secrets in my project

env_drift

Compares environment variables across .env, .env.example, and code references to detect drift.

Parameters:

  • root_dir (string, optional) — Project root directory (default: current directory)

Example:

Use the env_drift tool to check if my .env.example is up to date

Commands

/env-check

Runs all three validations in one shot — validate, leak detection, and drift check. Gives you a complete environment health report.

Resources

License

MIT