🎁 福利专区全网大模型免费应用 + 新用户福利 + 注册活动入口,低成本玩转 AI

环境变量管家 ownduck/dsh-custom-env

DeepSeek Harness
ownduck9 天前有提交已提供中文文档扫描:含敏感能力

在设置页增删改环境变量并同步到系统用户环境

30/100
综合分
0
GitHub 星标
—
npm 周下载
—/5
用户评分

数据截至 2026/10/26 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。

安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add ownduck/dsh-custom-env
该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)

状态速览

判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态
信任档位:仅索引
是什么
dsh 原生插件 · other
装得上吗
本站尚未做安装检查
安全吗
本站尚未对该插件做风险分级
暂未覆盖,不等同于无风险
还在维护吗
活跃:最近一次提交在 9 天前
档位由哪些信号合成

本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。

验证判据与等级说明 →
社区实装还没有人打卡 · 装过的第一个就是你
安全扫描自动 · 静态分析源码
v2.7.0
🔵 扫描:含敏感能力尚无人工评估
展开查看扫描说明与证据 ↓

静态扫描发现插件具备触达本地系统的能力:执行外部命令、读写/删除本地文件、读取剪贴板或密钥类环境变量(至少其一)。这是能力清单,不是危险判定——具体能力项与证据见下方,安装前请自行判断是否需要。

可执行外部命令读写/删除本地文件写入剪贴板(不计风险)
查看扫描证据(共 36 处,展示前 25 条)
  • 读取本地文件
    lib/index.js:116
    accessSync(path, constants.X_OK);
  • 读取本地文件
    lib/index.js:124
    if (!lstatSync(path).isSymbolicLink()) return void 0;
  • 读取本地文件
    lib/index.js:215
    if (!lstatSync2(destination).isSymbolicLink()) return void 0;
  • 读取本地文件
    lib/index.js:226
    if (!isAbsolute3(launcher) || !existsSync3(launcher)) {
  • 写入本地文件
    lib/index.js:243
    mkdirSync(dirname2(MAC_CLI_DESTINATION), { recursive: true });
  • 删除本地文件
    lib/index.js:246
    unlinkSync(pending);
  • 删除本地文件
    lib/index.js:253
    unlinkSync(MAC_CLI_DESTINATION);
  • 写入本地文件
    lib/index.js:257
    renameSync(pending, MAC_CLI_DESTINATION);
  • 删除本地文件
    lib/index.js:260
    unlinkSync(pending);
  • 写入本地文件
    lib/index.js:284
    writeFileSync(MAC_CLI_RECEIPT, `${JSON.stringify(receipt)}
  • 读取本地文件
    lib/index.js:289
    const existing = readFileSync(MAC_CLI_RECEIPT, "utf8");
  • 读取本地文件
    lib/index.js:400
    if (existsSync5(candidate)) return candidate;
  • 执行外部命令来自配置/变量
    lib/index.js:414
    const child = spawn(
  • 执行外部命令固定命令
    lib/index.js:625
    const result = spawnSync("launchctl", args, { encoding: "utf8" });
  • 删除本地文件
    lib/index.js:645
    unlinkSync2(path);
  • 写入本地文件
    lib/index.js:649
    mkdirSync2(AGENT_DIR(), { recursive: true });
  • 写入本地文件
    lib/index.js:650
    writeFileSync2(path, buildPlist(entries), "utf8");
  • 写入本地文件
    lib/index.js:809
    mkdirSync3(dirname5(path), { recursive: true });
  • 执行外部命令来自配置/变量
    lib/index.js:1109
    const child = spawn2(process.execPath, [script], {
  • 写入剪贴板
    lib/client.js:982
    void navigator.clipboard.writeText(text);
  • 执行外部命令固定命令
    lib/write-user-env.child.js:37
    const result = spawnSync("launchctl", args, { encoding: "utf8" });
  • 读取本地文件
    lib/write-user-env.child.js:52
    if (existsSync(path)) {
  • 删除本地文件
    lib/write-user-env.child.js:57
    unlinkSync(path);
  • 写入本地文件
    lib/write-user-env.child.js:61
    mkdirSync(AGENT_DIR(), { recursive: true });
  • 写入本地文件
    lib/write-user-env.child.js:62
    writeFileSync(path, buildPlist(entries), "utf8");
扫描于 2026/11/4(0 天前) · 范围 入口闭包 + 发布文件清单 · 来源 GitHub 仓库

静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。

依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/dsh-home-paths@deepseek-ai/dsh-typert-protocol
给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个

在设置里管理 $DSH_HOME/.env,同步 Host 与 Windows/macOS 用户环境变量

README

由 DeepSeek 最新模型翻译生成
dsh-custom-env 社区维护的 DeepSeek Harness(DSH)插件:在 设置 → 环境变量 中管理 $DSH_HOME/.env。非 DeepSeek AI 官方产品。 保存后立即写入 Host 的 process.env,并在 Windows / macOS 同步到用户环境(新开终端才能看到 OS 侧变更)。不同步 Linux 用户环境。 功能 - 设置页对 $DSH_HOME/.env 增删改(文件不存在时自动创建) - 热写到当前 Host 进程 - Windows / macOS 用户环境同步 - 拒绝 bootstrap 名(PATH、DSH_、XDG_ 等),与 app-boot 对 .env 的限制一致 - dsh 命令区块:展示用户 PATH 上的 dsh 与启动本 Host 的期望启动器;不一致时显示 安装 按钮(Windows 用户 PATH / macOS /usr/local/bin/dsh)。无卸载按钮。 前置条件 - 已安装可用的 DeepSeek Harness,且终端里能运行 dsh(CLI 或 Desktop 自带 CLI) - 选择 profile:desktop(Electron)或 web(浏览器)。下文两种都有。 安装 已发布到 npm:@woosau/dsh-custom-env。
展开完整文档(README 剩余 1 节)
dsh-custom-env

社区维护的 DeepSeek Harness(DSH)插件:在 设置 → 环境变量 中管理 $DSH_HOME/.env。非 DeepSeek AI 官方产品。

保存后立即写入 Host 的 process.env,并在 Windows / macOS 同步到用户环境(新开终端才能看到 OS 侧变更)。不同步 Linux 用户环境。

功能

- 设置页对 $DSH_HOME/.env 增删改(文件不存在时自动创建)
- 热写到当前 Host 进程
- Windows / macOS 用户环境同步
- 拒绝 bootstrap 名(PATH、DSH_、XDG_ 等),与 app-boot 对 .env 的限制一致
- dsh 命令区块:展示用户 PATH 上的 dsh 与启动本 Host 的期望启动器;不一致时显示 安装 按钮(Windows 用户 PATH / macOS /usr/local/bin/dsh)。无卸载按钮。

前置条件

- 已安装可用的 DeepSeek Harness,且终端里能运行 dsh(CLI 或 Desktop 自带 CLI)
- 选择 profile:desktop(Electron)或 web(浏览器)。下文两种都有。

安装

已发布到 npm:@woosau/dsh-custom-env。不发 npm 也可从 GitHub 安装。

Desktop(推荐)

若 plugin 报 profile package.json 的 EPERM,先退出 Desktop / VertaxWork。

dsh plugin --profile desktop add @woosau/dsh-custom-env

GitHub 安装:dsh plugin --profile desktop add github:ownduck/dsh-custom-env

本插件依赖原生包 koffi。从 GitHub 安装时,若 pnpm 拦截 install 脚本,需在 profile 的 pnpm-workspace.yaml 中设置 allowBuilds.koffi: true 后再 add。npm 安装一般自带预编译二进制,通常不必这一步。

重启 Desktop,打开 设置 → 环境变量。

Web

[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
dsh plugin --profile web add @woosau/dsh-custom-env
dsh --profile web --dump-config

GitHub:dsh plugin --profile web add github:ownduck/dsh-custom-env

配置输出中应出现 # == dsh-custom-env / @woosau/dsh-custom-env 层和 custom-env 插件行。然后重启 DSH Web,并在浏览器硬刷新。

让 Agent 帮你安装

请将 DSH 插件 @woosau/dsh-custom-env 安装到本机 desktop profile,执行:dsh plugin --profile desktop add @woosau/dsh-custom-env。重启 Desktop 后确认「设置 → 环境变量」可用。

从本地克隆安装(file: / .)

git clone https://github.com/ownduck/dsh-custom-env.git
cd dsh-custom-env
dsh plugin --profile desktop add .
或:dsh plugin --profile web add .
dsh --profile web --dump-config

从 npm 安装(指定 registry)

dsh plugin --profile desktop add @woosau/dsh-custom-env@latest --registry=https://registry.npmjs.org/

卸载 / 重装

dsh plugin --profile desktop remove @woosau/dsh-custom-env
dsh plugin --profile desktop add @woosau/dsh-custom-env

本地 file: 开发:改 src 后重建 lib/,再重启 DSH。只有改了 package.json / cordis.patch.yml 才需要重新 plugin add。

使用

1. 打开 设置 → 环境变量
2. 草稿编辑:点 确定 才写入 $DSH_HOME/.env(并热写 Host/OS);取消 只恢复输入框
3. 确定后行旁提示需重启——新增标为新增项;相对 Host 启动值的 修改 另有 恢复(写回启动时的值)
4. 完整生效请重启 DSH / 新开终端;Host 重启后提示与恢复按钮消失
5. 在 dsh 命令区块对比 PATH 与期望路径;仅在出现按钮时点击 安装

不要把 bootstrap 名(含 PATH)写进 .env。应用配置用普通名字即可。名称含 KEY / SECRET / TOKEN 时仍会被现有 harness 策略从模型可见 shell 中 scrub。

在设置页安装 dsh CLI

期望路径由 当前 Host 的启动方式 推断(Desktop 打包的 resources/runtime/cli/bin,或 Node/源码启动的 argv 启动器)。

| 平台 | 安装行为 | 冲突说明 |
| Windows | 将期望 bin 目录写入用户 Path(注册表)。所有权键:Software\dsh-custom-env\Command(不用 DeepSeekHarness)。 | 可与 Desktop 的 PATH 条目并存;新终端里谁排前用谁。 |
| macOS | 写符号链接 /usr/local/bin/dsh → 期望启动器。收据:.dsh-custom-env-command.json。 | 与 Desktop「管理 dsh 命令…」同一路径,可能覆盖其链接。 |
| Linux | 仅展示状态,无安装按钮。 | — |

安装后请 新开 终端。本插件不会调用 Desktop app.relaunch。

开发

cd dsh-custom-env
pnpm test # 或:node --import tsx/esm --test tests/*.spec.ts
pnpm build # 重建 lib/(client 打包依赖旁路的 vertax-work esbuild)

测试在 tests/(env-file.spec.ts、cli-path.spec.ts)。文档即本 README 中英双语。

GitHub 与 npmjs

| 渠道 | 够不够用 | 安装命令 |
| 只推 GitHub | 够 | dsh plugin add github:ownduck/dsh-custom-env |
| npmjs | 推荐 | dsh plugin add @woosau/dsh-custom-env |

推到 GitHub 即可分享与安装。发 npmjs 只是可选便利(短包名、版本号、徽章),与社区插件同时维护 GitHub + npm 的做法类似。

许可证

MIT
预览分享卡片长什么样 ↓ownduck/dsh-custom-env
分享 · DeepSeek Harness Hub
ownduck/dsh-custom-env

在设置页增删改环境变量并同步到系统用户环境

这是你的仓库?认领条目

回到顶部