Skip to main content

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_ENV set but the resolved Python living outside it, or JAVA_HOME pointing somewhere different from the java on 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
  • packageManager field in package.json disagrees 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

  1. Create src/showmyenv/collectors/runtimes/<name>.py following the pattern in python.py or go.py. The collector receives a ScanContext and returns a RuntimeInfo.
  2. Register it in src/showmyenv/collectors/runtimes/__init__.py.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

showmyenv-1.0.1.tar.gz (57.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

showmyenv-1.0.1-py3-none-any.whl (60.3 kB view details)

Uploaded Python 3

File details

Details for the file showmyenv-1.0.1.tar.gz.

File metadata

  • Download URL: showmyenv-1.0.1.tar.gz
  • Upload date:
  • Size: 57.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for showmyenv-1.0.1.tar.gz
Algorithm Hash digest
SHA256 592e699be0f995087b3d66486357e1337e4a6d59f4979dee27c5f6189ee1c830
MD5 c73b2ab555a8a65fc4178f4cb42d21e4
BLAKE2b-256 0597e22063ca2bd3a5ec6db5e76efcfc251244ec164072eb5ae08e69d9bf1d69

See more details on using hashes here.

File details

Details for the file showmyenv-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: showmyenv-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 60.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for showmyenv-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 943fd4838da9eeada61def0948b6535e9c4aa06fbc333e20112655af2f4abbd4
MD5 8415145fa4f2bbcdc99d535ca91ec387
BLAKE2b-256 a7b58014d761e92c9ebdf76e729f98c9058be36aa9283a0ee0b6bc05029923af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page