dsh-import
August 13, 2026 · View on GitHub
把 Claude Code、Codex、Cursor 的 MCP、rules、hooks 一键导入 DeepSeek Harness —— DSH 一直缺的那个 /import。
Codex CLI 自带 /import,能把你的 Claude Code 和 Cursor 配置导入到 Codex。DSH 没有等价物。这个插件补上了它:打开 设置 → 导入配置,点 自动检测,选一个来源,导入。完事。


⚠️ 有任何 bug 随时联系作者:提 Issue,作者会在第一时间处理。
特性
-
自动检测 — 扫描你的家目录(
~/.claude、~/.codex、~/.cursor)和当前工作区,报告三个工具里装了哪些、各自有什么配置。 -
单选导入 — 检测到的来源可选,没检测到的置灰。只导你想导的那个(比如只导 Cursor),不是一股脑全导。
-
三来源 × 三类型,全覆盖
来源 \ 类型 rules MCP hooks Claude Code CLAUDE.md.mcp.json/~/.claude.jsonsettings.json→ CC bridgeCodex AGENTS.mdconfig.toml(TOML)hooks.json→ Codex bridgeCursor .cursor/rules/*.mdc.cursor/mcp.jsonhooks.json→ CC 方言 → CC bridge -
全局 + 项目双作用域 — 从家目录拉全局配置、从工作区拉项目配置,各自落到 DSH 对应位置(
~/.dsh/AGENTS.mdvs 工作区AGENTS.md)。 -
真写入,非预览 — rules 落到
AGENTS.md;MCP 服务器和 hooks bridge 落到 profile 的cordis.patch.yml。 -
热加载 — MCP 和 hooks 被 DSH 的 boot HMR 自动接住,无需重启。
-
自动备份 — 每个被改的目标文件先留一份
.bak-<时间戳>。 -
幂等 + 合并安全 — 重复导入同一源会跳过;导入第二个源是追加而不是覆盖。
-
凭证安全 —
${VAR}引用转成 DSH 的!!js process.env.VAR表达式,不发明明文 token。
安装
# 从本地 checkout 安装(npm 包名:dsh-config-importer)
dsh plugin --profile web add /path/to/dsh-config-importer
# 然后重启 web profile
这个包声明了 dsh.bundle patch,dsh plugin add 会把它 reconcile 进 profile 的 dsh.profile.bundles 层,并通过 cordis.patch.yml 挂载 config-importer 这一行。
使用
- 打开 DSH 设置(左下角)。
- 打开 导入配置 页。
- 点 自动检测 — 页面列出 Claude Code / Codex / Cursor 里装了哪些、各自有什么(全局和/或项目)。
- 选一个来源(没检测到的会置灰)。
- 勾选要导入的类型(Rules / MCP / Hooks)。
- 点 开始导入。
页面会展示逐项结果:导入了什么、跳过了什么(已存在)、不支持什么(例如 sse/ws MCP transport,DSH 不支持)。
联系作者
- 提 Issue:github.com/cms19859230182-lang/dsh-import/issues
- 有 bug、想要新特性、或者只是觉得好用,都欢迎来聊。
dsh-import
Import MCP servers, rules, and hooks from Claude Code, Codex, and Cursor into DeepSeek Harness — the /import command DSH was missing.
Codex CLI ships a /import that pulls your Claude Code and Cursor config into Codex. DSH had no equivalent. This plugin fills that gap: open Settings → 导入配置 (Import config), hit 自动检测 (Auto-detect), pick a source, and import. Done.
⚠️ Found a bug? Contact the author any time — open an Issue.
Features
- Auto-detect — scans your home directory (
~/.claude,~/.codex,~/.cursor) and the current workspace, and reports which of the three tools are installed and what they carry. - Pick one source — detected sources are selectable; undetected ones are greyed out. Import only the tool you want (e.g. Cursor), not everything at once.
- Three sources × three config kinds, full matrix — see the table above (Chinese section).
- Global + project scopes — pull global config from your home directory or project config from the workspace, into the matching DSH location (
~/.dsh/AGENTS.mdvs workspaceAGENTS.md). - Real writes, not previews — rules land in
AGENTS.md; MCP servers and hooks bridge rows land in your profile'scordis.patch.yml. - Hot reload — MCP and hooks rows are picked up by DSH's boot HMR, no restart needed.
- Automatic backup — every target file gets a
.bak-<timestamp>copy before it is modified. - Idempotent + merge-safe — re-importing the same source skips duplicates; importing a second source appends instead of overwriting.
- Credential-safe —
${VAR}references become DSH's!!js process.env.VARexpressions; no plaintext tokens are invented.
Install
# from a local checkout (npm package name: dsh-config-importer)
dsh plugin --profile web add /path/to/dsh-config-importer
# then restart the web profile
The package declares a dsh.bundle patch, so dsh plugin add reconciles it into the profile's dsh.profile.bundles layer and mounts the config-importer row via cordis.patch.yml.
Usage
- Open DSH settings (bottom-left).
- Open the 导入配置 / Import config page.
- Click 自动检测 (Auto-detect) — the page lists which of Claude Code / Codex / Cursor are installed, and what each carries (global and/or project).
- Pick one source (undetected sources are greyed out).
- Tick the kinds to import (Rules / MCP / Hooks).
- Click 开始导入 (Start import).
Contact
- Open an issue: github.com/cms19859230182-lang/dsh-import/issues
License
MIT