Venv-manager, a Python venv runtime for Humans and AI agents
venv-manager is a Go‑based runtime that simplifies Python virtual‑environment management for both developers and AI agents. It monitors script files, parses imports, and automatically installs missing packages whenever the code changes. The tool also offers a Model Context Protocol server with typed JSON‑RPC tools for creating, snapshotting, and sandboxed execution of environments.
- ▪venv-manager provides a clean CLI and a file‑watcher that keeps a virtual environment in sync with a Python script’s imports.
- ▪It exposes a Model Context Protocol server allowing agentic clients like Claude Desktop, Cursor, and Zed to invoke environment operations via typed JSON tools.
- ▪The system supports ephemeral sandboxed execution, using sandbox‑exec on macOS and bwrap on Linux to isolate network and filesystem access.
- ▪Snapshots capture pip freeze data, enabling rollback of environments to previous states.
Opening excerpt (first ~120 words) tap to expand
venv-manager A Python virtual-environment runtime for humans and AI agents. Written in Go. One static binary, no runtime deps beyond python3 (or uv, if available). The GIF above is real: venv-manager watch app.py --venv X monitors a file, scans its imports with a tiny AST-lite parser, and pip-installs whatever is missing — every time the file changes. Point it at a script an LLM is iterating on and the venv converges as the code does. Why Two failure modes drove this tool: Human sprawl. Venvs multiply across ~, cache directories eat GB, activation syntax varies by shell, and cloning "the env that worked" means copy-pasting pip freeze between terminals. Agent sprawl.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.