Runs any command in a minimal environment (only PATH, HOME, USER, PWD, SHELL, LANG) and diffs the command's visible environment against your current shell. Surfaces which environment variables would leak into a subprocess and which ones your command needs but won't have. Helps reproduce 'it works on my machine' bugs by showing exactly what the command sees. Passes through exit codes.
DevOpsDebuggingEnvironmentCLI
Features
- Minimal environment with PATH, HOME, USER, PWD, SHELL, LANG only
- Diff view: missing vars (would leak) and unexpected vars
- Exit code passthrough from child command
- Exclude list for known environment variables
- Verbose side-by-side comparison
Flags
| Long | Short | Description |
|---|---|---|
| --version | -V | Show version and license |
| --exclude | -e | Comma-separated vars to exclude from diff |
| --show-all | -a | Show all env vars, not just diff |
| --verbose | -v | Side-by-side comparison view |
Usage
terminal
$ dumpenv npm run build
$
$ dumpenv --exclude PATH,HOME --show-all python my_script.py
Dependencies
stdlib only — subprocess, os, sys
Install
$ curl -LO https://labs.stech-sol.com/downloads/dumpenv/0.5.0/dumpenv_0.5.0.tar.gz
$ tar xzf dumpenv_0.5.0.tar.gz
$ chmod +x dumpenv/dumpenv.py
$ sudo ln -s $PWD/dumpenv/dumpenv.py /usr/local/bin/dumpenv
About
Downloads
Verify integrity
SHA256 checksums