Show HN: Envoic – Find and clean up scattered Python virtual environments (github.com)

3 points by mahimai ↗ HN
I work across a lot of Python projects and kept losing track of virtual environments — old `.venv` directories sitting in project folders, eating disk. There's no built-in way to answer "where are all my venvs and how much space are they using?"

envoic scans your filesystem, detects Python environments using ground-truth signals (pyvenv.cfg, bin/python, conda-meta), and presents a utilitarian report.

    uvx envoic scan ~/projects
The interactive `manage` command lets you select environments to delete with a checkbox UI.

Design choices:

- Two dependencies (typer + questionary). Dataclasses instead of Pydantic to keep the install under 3MB — important since `uvx` downloads on every invocation.

- Detection doesn't rely on directory names alone. It checks for `pyvenv.cfg` (the definitive marker), Python binaries, activation scripts, and conda metadata.

- Deletion requires typing "delete", not y/n. Symlinks are unlinked without following. Paths outside the scan root are rejected.

- Output style is inspired by USGC's TR-100 Machine Report [1] — monospaced, box-drawn, no colors. Information density over decoration.

[1] https://github.com/usgraphics/usgc-machine-report

0 comments

[ 3.2 ms ] story [ 7.3 ms ] thread

No comments yet.