Skip to main content

Scan directories to find Python virtual environments

Project description

envscan — CLI to discover Python environments

envscan is a small, open-source command-line tool that scans a directory tree and reports the Python environments it finds — venv, virtualenv, uv, and conda, plus pipenv/poetry and pyenv markers — in a clean, aligned table.

envscan output

Install

pip install envscan

For local development (editable install from source):

python -m pip install -e .

Quick start

  • Scan the current directory:
envscan
  • Scan a specific directory and print JSON:
envscan --path ./project --format json
  • Show each environment's Python version:
envscan --python-version
  • List installed packages in each environment:
envscan --packages
  • Search for a specific library across every environment found (optionally pinned to an exact version):
envscan --search "monai"
envscan --search "monai==1.2.7"

Command reference

  • --path PATH : Path to scan (default .)
  • --depth INT : Max recursion depth (default 3)
  • --format {text,json} : Output format (default text)
  • --include-hidden : Include hidden files and directories (.venv is always scanned regardless of this flag, since it's the standard name across venv/virtualenv/uv)
  • --follow-symlinks : Follow symbolic links
  • --python-version : Show each environment's Python version (runs its interpreter; failures are shown inline in the table, no --verbose needed)
  • --packages : List installed packages in each environment (runs pip/conda/uv)
  • --search QUERY : Only show environments with a given library installed, e.g. --search "monai" or --search "monai==1.2.7" (exact-version matching only — >=, <=, etc. are not supported)
  • --json-file PATH : Write JSON output to the given file
  • --verbose : Verbose output (extra diagnostic logging)

Notes

  • By default envscan uses conservative file-marker heuristics (e.g., presence of pyvenv.cfg, conda-meta, Pipfile, .python-version) and does not execute any discovered interpreters. Use --python-version or --packages to opt into running an environment's own interpreter/pip/conda/uv.

Contributing

Contributions welcome — open a PR with tests.

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

envscan-0.2.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

envscan-0.2.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file envscan-0.2.1.tar.gz.

File metadata

  • Download URL: envscan-0.2.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for envscan-0.2.1.tar.gz
Algorithm Hash digest
SHA256 ea0b79211d678c71659e57cdb6645d82746c4d7b16412b5156c2a6580299bef5
MD5 1e43fc6dc79219191b094aa00f489696
BLAKE2b-256 aa241a4e34bad7970e225c8b3ce99b9488ec6431ca9579e82c2f28a5b8fb23b6

See more details on using hashes here.

File details

Details for the file envscan-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: envscan-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for envscan-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf98c1003b0853379efec716d524ea4a38dbb98be324f1f1246986083a89af96
MD5 3bbb31584040d75e6c0470cf41d5bb5b
BLAKE2b-256 bb54c959690ebde85b40256add9851e4884d1091519a6006e0cd134c6ecfebcb

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