Environment diagnostic CLI: see what is actually running, what is influencing it, what conflicts, and how to fix it.
Project description
showmyenv
Other tools tell you what's installed. showmyenv tells you what's actually running, what's influencing it, what's conflicting with it, and what to fix.
A read-only environment diagnostic CLI for developers. It inspects your shell environment and explains it — no mutations, no side effects.
Installation
pip install showmyenv
# or
pipx install showmyenv
Requires Python 3.9 or later. Runtime dependencies: typer, rich, psutil.
Quick start
showmyenv # full scan (same as showmyenv scan)
showmyenv quick # fast scan, skips Docker/Cloud/IDE discovery
showmyenv health # health score with grade and per-category breakdown
Commands
| Command | Description |
|---|---|
showmyenv scan |
Full environment scan |
showmyenv quick |
Fast scan (runtimes, PATH, ports only) |
showmyenv health |
Health score and all findings |
showmyenv which |
Show how each known command resolves |
showmyenv ports |
Listening ports with likely service names |
showmyenv docker |
Docker containers, images, disk usage |
showmyenv doctor |
Check project manifest requirements against active runtimes |
showmyenv snapshot |
Save a snapshot to JSON |
showmyenv compare A B |
Diff two snapshot files |
showmyenv report |
Generate a report (--format json|markdown|html) |
All commands accept --json for machine-readable output.
What it checks
Runtimes
Detects active versions and install paths for Python, Node.js, Java, Go, Rust, .NET, Ruby, and PHP. For each runtime it reports:
- The resolved executable and its version
- Installed versions from version managers (pyenv, nvm, rbenv, rustup, sdkman)
- Misconfigurations — for example,
VIRTUAL_ENVset but the resolved Python living outside it, orJAVA_HOMEpointing somewhere different from thejavaon PATH
PATH analysis
- Duplicate entries
- Broken entries (directory does not exist)
- Shadowing — when an older version of a tool appears earlier in PATH than a newer one, this is flagged HIGH and explained
Project Doctor (showmyenv doctor)
Reads manifest files in the current directory and compares their declared runtime requirements against what is actually active:
Runtime Required Active Status Source
python >=3.11 3.9.6 FAIL pyproject.toml
node ^18 20.11 PASS package.json
Supported manifests: pyproject.toml, package.json, go.mod, pom.xml, build.gradle, Dockerfile, .tool-versions, .nvmrc, .python-version, rust-toolchain.toml, Gemfile, composer.json, global.json, and more.
Conflict detection
Pure analysis over collected data — no extra system calls:
- Virtualenv present but inactive
- Multiple JS package manager lockfiles (
package-lock.json+yarn.lock+pnpm-lock.yaml) - Multiple Python version managers active simultaneously
packageManagerfield inpackage.jsondisagrees with the resolved package manager
Root cause engine
When known problem patterns are detected, showmyenv explains them with ranked causes and actionable fixes. Current rules:
- Package installed but won't import — fires on interpreter/venv mismatches
- Older tool shadows newer — fires on HIGH-severity PATH shadows
- Wrong Java version — fires on JAVA_HOME mismatches or failed doctor checks
- Node version mismatch — fires on failed doctor checks or lockfile conflicts
- Docker reclaimable space — fires when Docker has significant space to reclaim
Docker
Shells out to the local docker binary (no SDK dependency). Reports containers, images, disk usage, and reclaimable space. Degrades gracefully when Docker is not installed or the daemon is not running.
Cloud environment
Detects active AWS, Azure, and GCP configuration by shelling out to aws, az, and gcloud. Reports the active account/project/subscription and where credentials come from (environment variable, config file, or SSO). Credential values are never echoed.
IDE discovery
Finds installed editors via well-known application paths and CLI shims: VS Code, Cursor, Windsurf, IntelliJ IDEA, PyCharm, WebStorm, Vim, Neovim, Emacs, Zed.
Health score
A weighted score from 0–100 with a letter grade (A–F):
| Category | Weight |
|---|---|
| Runtime Configuration | 25% |
| PATH Integrity | 20% |
| Dependency Health | 20% |
| Security Checks | 15% |
| Environment Variables | 10% |
| Docker Health | 10% |
Every point deducted traces back to a specific finding, so the score is always explainable. Categories that don't apply (e.g. no Docker) are marked N/A and excluded from the weighted average.
Snapshots and comparison
showmyenv snapshot -o before.json
# ... make changes ...
showmyenv snapshot -o after.json
showmyenv compare before.json after.json
The diff shows runtime version changes, new/resolved findings, health score delta, and PATH entry changes.
Reports
showmyenv report --format json > report.json
showmyenv report --format markdown > report.md
showmyenv report --format html -o report.html
The HTML report is a single self-contained file with inline CSS — suitable for attaching to a ticket or sharing with a teammate.
Security
- Read-only by design. showmyenv never writes environment variables, modifies PATH, installs packages, or starts/stops services.
- Secret redaction. Environment variables matching secret-shaped patterns (
API_KEY,SECRET,TOKEN,PASSWORD, etc.) are detected and their values are replaced with[redacted]in all output formats. - No full environment dump. Only a curated allowlist of meaningful variables is collected and shown.
- Credential sources, not values. The cloud collector reports where credentials come from (env var / config file / SSO), never the credential itself.
Environment variables understood
showmyenv reads but never modifies: JAVA_HOME, PYTHONPATH, VIRTUAL_ENV, CONDA_DEFAULT_ENV, NODE_PATH, NPM_CONFIG_PREFIX, GOROOT, GOPATH, GOBIN, CARGO_HOME, RUSTUP_HOME, GEM_HOME, RBENV_ROOT, PYENV_ROOT, NVM_DIR, AWS_PROFILE, AWS_REGION, GOOGLE_CLOUD_PROJECT, AZURE_SUBSCRIPTION_ID, DOCKER_HOST, KUBECONFIG, PATH, SHELL, LANG, HOME, USER.
Global flags
--json Output as JSON (any command)
--no-color Disable color output
--check-updates Check for outdated packages (requires network, scan only)
--version Print version and exit
Development
git clone https://github.com/kshitizyadav/showmyenv
cd showmyenv
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Run during development
showmyenv scan
showmyenv health
showmyenv doctor
# Quality gates (run before submitting a PR)
ruff format .
ruff check . --fix
mypy src/showmyenv
pytest
Adding a new runtime collector
- Create
src/showmyenv/collectors/runtimes/<name>.pyfollowing the pattern inpython.pyorgo.py. The collector receives aScanContextand returns aRuntimeInfo. - Register it in
src/showmyenv/collectors/runtimes/__init__.py. - Add a fixture-based test in
tests/collectors/using a fake binary — do not depend on the host having the runtime installed.
See CLAUDE.md for the full contributor guide.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file showmyenv-1.0.0.tar.gz.
File metadata
- Download URL: showmyenv-1.0.0.tar.gz
- Upload date:
- Size: 57.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d1033209bf4943c3c0fdfa1819151c5dd1529e06db0d588d4ce108968e696b6
|
|
| MD5 |
1ff7c18906f0c89a04cc654a942e3c65
|
|
| BLAKE2b-256 |
8ebc350272620fa187eadda9db0a0eebbf8b2c468a93a183b8341081a65e8fdc
|
File details
Details for the file showmyenv-1.0.0-py3-none-any.whl.
File metadata
- Download URL: showmyenv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 59.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a200f0db5bd3eb76feb77c4226e691d4e2ef1f76fc312764c02177d95f81b7b3
|
|
| MD5 |
42886ea0aad7eeacc638b2c2e9c698cf
|
|
| BLAKE2b-256 |
223be010c7d1795c37bfb8d80e6a45d1f6055b9fba0e8488d1febb80270d79e0
|