What problem does it solve?
This rule ensures that an optional env.sh is sourced before any build, run, or deployment command, preventing missing environment configuration from causing failures.
Core Features & Use Cases
- Environment preloading: If env.sh exists at the project root, it is sourced automatically before the command.
- Wide compatibility: Applies to common workflows across Node (pnpm, bun, npm scripts like dev/build/start), compilers (zig, go, cargo, dotnet), task runners (make, just, rake), and infra tools (docker, docker-compose, terraform, kubectl).
- Safe fallback: If env.sh is absent, commands run normally with existing environment variables.
Quick Start
Place an env.sh at your project root containing your environment exports. Then run your usual build or deployment command (e.g., pnpm build); if env.sh exists, it will be sourced first.