angeloszou/dsh-python-env

Workspace-scoped Python virtualenv management for DSH: discover, create, install into and remove venvs through host-side tools.

Creates and manages Python virtual environments for a DSH project through five model tools plus a python-env skill and a system-prompt guidance section. pyenv_discover finds environments up to two levels deep by their pyvenv.cfg marker or conventional names (.venv, venv, env, .env, virtualenv) and reports path, interpreter, version and pip availability; pyenv_create builds one; pyenv_install installs packages or a requirements file, repairs a missing pip through ensurepip, supports upgrade, editable installs of in-workspace projects, and run_in_background for long installs that register with the jobs registry; pyenv_uninstall removes packages offline and never auto-creates an environment; pyenv_remove deletes a real workspace environment and refuses anything that is not one. The design reason the README gives is the sandbox: a shell-side pip fails because the shell sandbox blocks CPython's owner-only temp directories and package-index access, so every python and pip call goes through the host subprocess channel instead. On a network-classified failure it retries across the TUNA, Aliyun and USTC mirrors and probes common local proxy ports, and it pins a mirror or proxy when you pass index or proxy.

Coding & Development ★ 4
View on GitHub ↗

Install

dsh plugin --profile web add dsh-python-env

The npm line from the README's Install section; the README also documents a link:<absolute-path-to-this-repo> form for a local checkout. It states that you must restart the DSH backend afterwards, since the host composition loads at process start, and that the tools appear in new sessions.

Compatibility

Node.js 20 or newer (the README's badge), and Python 3.8 or newer on PATH for the environments the plugin manages — the plugin's own runtime does not need Python. The mutating tools consult the session's sandbox policy and refuse to run in read-only sessions, while discovery stays available everywhere. Every path resolves inside the session workspace (case-insensitive on Windows), caches and temp state live under <workspace>/.dsh-pyenv/, the global Python environment and host pip cache are never touched, and each tool has a two-minute budget (one minute for discovery) after which it terminates its process tree.

Details

Alternatives

AngelosZou/graphlint · alooshxl/dsh-session-pins · LeemanCheung/dsh-token-usage

More plugins in Coding & Development

Browse more in Coding & Development

Guides for Coding & Development plugins