emuco/dsh-venv
Per-project runtime environments for DeepSeek Harness: auto-adopt or create a project-local Python venv (.venv_local/python) and wire in toolchains/env vars for the runtimes each project uses.
Project Overview项目介绍
emuco/dsh-venv is a DSH-native plugin built exclusively for DeepSeek Harness that manages per-project isolated runtime environments. It can be installed in two ways, either from the public npm registry with the command dsh plugin --profile web add dsh-venv, or directly from the GitHub source code with dsh plugin --profile web add github:emuco/dsh-venv. After installation completes, you must restart DSH for the plugin to load correctly, as this is a requirement for DSH to load any new plugin layer. It automatically detects project runtimes from standard configuration files, then creates or takes over the corresponding environments and injects the correct environment variables.
This plugin addresses common pain points that arise when working with multiple Python projects in DSH. If all DSH workspaces share the system-wide Python installation, cross-project dependency pollution can occur, changes from one project can break the system Python installation, and environments cannot be easily moved when switching devices or workspaces. By giving every project its own isolated environment, dsh-venv eliminates these issues. It is designed for any developer working on Python, Node.js, or Go projects within DSH, and requires zero manual configuration after installation.
dsh-venv is released under the permissive MIT license, which allows free use and modification. It places all isolated environments in a .venv_local directory in your project root, with a separate subdirectory for each supported runtime. It follows a "take over if exists, create if not" rule, so it will never overwrite an existing environment, and will throw an error instead of silently falling back to the system Python if the project environment is missing or invalid. Developers can run the built-in node tests with the npm test command when modifying the source code.
这是一个面向 DeepSeek Harness(DSH)的原生项目环境管理插件,为每个 DSH 工作区或项目提供独立的运行时环境。它可自动识别项目使用的运行时,自动创建或接管 Python 虚拟环境,同时能在检测到对应配置文件时关联 Node.js 和 Go 运行时,注入相关环境变量,保证 python、pip 命令永远指向项目环境,不会静默回落到系统 Python。
当开发者在 DSH 中同时打开多个 Python 相关项目时,如果所有项目共享系统 Python 环境,容易出现不同项目依赖互相污染、系统 Python 被项目改动影响变得不可控,以及更换设备或工作区后环境无法迁移的问题。dsh-venv 通过为每个项目分配独立环境,解决了这些问题,适合所有需要在 DSH 中开发多语言项目的开发者使用。
该项目遵循 MIT 许可证,可通过 npm 或 GitHub 源码两种方式安装,安装命令分别为 dsh plugin --profile web add dsh-venv 和 dsh plugin --profile web add github:emuco/dsh-venv。安装完成后需要重启 DSH 才能生效,项目内置单元测试,可通过 npm test 命令运行测试。它支持 Python、Node.js、Go 三种运行时,遵循「有则接管,无则自动建」的设计原则,无需额外配置。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-venv(emuco/dsh-venv)
仓库:https://github.com/emuco/dsh-venv
本站详情页:https://www.yhbd.top/plugins/emuco-dsh-venv/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-09-07 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-venv
把 emuco/dsh-venv 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-venv
为每个 DSH 工作区 / 项目提供独立的运行时环境。自动识别项目用了哪些运行时,自动创建/接管 python venv,并把各运行时的环境变量注入到工作区——
python/pip永远走项目环境,绝不静默落到系统 Python。
DeepSeek Harness(DSH)项目环境管理插件。
为什么需要它
在 DSH 里打开多个项目时,如果所有会话共享系统 Python,容易出现:
- 不同项目依赖互相污染(A 项目装了包,B 项目"看到了")
- 系统 Python 被项目改动弄得不可控
- 换机器 / 换工作区,环境没法跟着项目走
dsh-venv 给每个项目一个独立环境,让 agent 跑 Python 工具时永远用项目自己的解释器。
设计理念
- 有则接管,无则自动建:目录存在就接管,不存在就
python -m venv .venv_local/python自动创建——不需要任何配置步骤。 - 一个文件夹承载多运行时:
.venv_local/是环境容器,每种运行时一个子目录:项目根/ └── .venv_local/ ├── python/ ← Python(venv,自动创建/接管) ├── node/ ← Node(检测到 package.json 时链接) └── go/ ← Go(检测到 go.mod 时链接) - 自动识别,零配置:检测到
pyproject.toml/requirements.txt→python、package.json→node、go.mod→go,把对应运行时的工具链 bin 前置 PATH 并注入专属变量(VIRTUAL_ENV、NODE_PATH、GOBIN)。 - 安全优先:缺少/无效的环境会报错,绝不静默回退到系统 Python;绝不覆盖已存在的环境。
功能
| 能力 | 说明 |
|---|---|
| 🎯 工具 | project_env_status(查看/自动接管)、project_env_ensure(缺失即自动建 venv)、project_env_run(在项目环境中执行命令) |
| 🖥️ Web 面板 | 设置页新增「项目环境」区,列出所有会话工作区的环境,状态一目了然 |
| 🧩 多运行时 | python(venv 真环境)+ node / go(工具链接入、变量注入) |
| 🔒 安全 | 无 venv 即报错,不回落系统 Python;不覆盖已有环境 |
安装
# 从 npm 安装:
dsh plugin --profile web add dsh-venv
# 或从 GitHub 源码安装:
dsh plugin --profile web add github:emuco/dsh-venv
安装后重启 DSH 生效(重启是 DSH 加载新 plugin 层的条件)。
使用
装好即可用,无需配置。agent 在上述系统提示的引导下会自动调用 project_env_* 工具;你也随时可以在设置页的「项目环境」面板查看各工作区的环境状态。
目录结构
src/index.js— 核心:路径、detect/status/environment、resolveCommand、create、run、多运行时environmentAllsrc/plugin.js— DSH host 插件:工具 + web API + 系统提示src/client.js— DSH client 端:设置面板cordis.patch.yml— DSH profile 插入补丁
开发
cd dsh-venv
npm test # 运行测试(node --test)
License
MIT
esengine/DeepSeek-Reasonix
strukto-ai/mirage
chuspeeism/dashi-taskboard
Aisland-SJL/dsh-worktable
ccch1mneyyy/working-activity
zhoushoujianwork/easyeda-agent
pulseaiclub/phi
Ikalus1988/MisakaNet