AngelosZou/dsh-python-env ↗★ 1
dsh-python-env
DeepSeek Harness plugin: workspace-scoped Python virtual environment management for agents (pyenv_discover / pyenv_create / pyenv_install / pyenv_uninstall / pyenv_remove). Runs the standard library python -m venv / pip through the host subprocess channel instead of the sandboxed shell, so venv creation, pip bootstrapping, and package-index network access work on Windows/macOS/Linux. Every mutation stays inside the session workspace, the global Python environment is never touched, network failures fall back across PyPI mirrors and common local proxy ports, and no third-party environment manager (uv, virtualenv, ...) is required.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AngelosZou/dsh-python-env说明文档
阅读完整 README ↗Usage
Agent side:
| Tool | What it does |
|---|---|
pyenv_discover | Find environments up to two levels deep by the pyvenv.cfg marker or conventional names (.venv, venv, env, .env, virtualenv); report path, interpreter, version, pip availability. |
pyenv_create | Create an environment with python -m venv — name / root_dir / base python arguments, idempotent on existing environments. |
pyenv_install | Install packages and/or a requirements file into an environment (explicit venv / discovered / auto-created .venv); repairs missing pip via ensurepip; mirror/proxy fallback; upgrade flag; editable installs of local projects; run_in_background for long installs. |
pyenv_uninstall | Remove packages from an environment (pip uninstall -y); offline; never auto-creates an environment. |
pyenv_remove | Delete a real workspace environment only (refuses non-environments and workspace escapes). |
pyenv_create # -> .venv, interpreter path reported
pyenv_install { packages: ["pytest>=8"] } # installs into .venv
pyenv_install { requirements: "requirements.txt" }
pyenv_uninstall { packages: ["pytest"] } # removes packages again
pyenv_discover # inspect every environment