dsh-jj
DSH bundle: jj (Jujutsu) version control via a zero-dependency MCP stdio server — exposes jj status/log/diff/describe/new/commit/edit/abandon/undo/rebase/fetch/push/bookmark as mcp__jj__* tools.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LosEcher/dsh-jj说明文档
阅读完整 README ↗dsh-jj — jj (Jujutsu) 版本控制 DSH 插件
把本机 jj CLI 通过零依赖 MCP stdio server 暴露成 DSH 工具(mcp__jj__*),
让模型在 jj 仓库里用 jj 语义做版本控制(status / log / diff / describe / new /
commit / edit / abandon / undo / rebase / fetch / push / bookmark / run),
而不是用 git 思维硬套。
前置条件
- jj ≥ 0.2x,可用
brew install jujutsu安装(macOS)或按 官方文档 安装 - Node ≥ 18(server 零依赖,纯 stdlib)
安装
dsh plugin --profile web add github:LosEcher/dsh-jj#main
本地开发(改源码时):
dsh plugin --profile web add link:/path/to/dsh-jj
新 bundle 安装后必须重启 dsh web(HMR 只覆盖 config 编辑):
~/.dsh/scripts/dsh-web-restart.sh # 或手动重启 dsh web
关于 command: jj-mcp
bundle patch 用 command: jj-mcp(包的 bin 入口)。pnpm 在安装时会把该
bin 链接到 profile 的 node_modules/.bin;若你的 dsh 进程 PATH 不含该
目录(launchd 等托管场景常见),MCP 行会 spawn 失败——此时在你的用户
patch 层用 id-targeted 配置覆盖为绝对路径:
- id: mcp-jj
config:
serverName: jj
transport: stdio
command: node
args: ['/absolute/path/to/dsh-jj/server.mjs']
env:
JJ_MCP_BIN: '/path/to/jj' # 可选
failOnStartupError: false
toolCallTimeoutMs: 120000
验证
# 1. 配置组合
pnpm dsh --profile web --dump-config | grep mcp-jj
# 2. 插件树 active(fiberPhase)
curl -s -X POST http://127.0.0.1:3080/api/pluginInventory/list \
-H "Content-Type: application/json" \
-d '{"type":"client-request","rpcId":"v1","method":"pluginInventory/list","payload":{"args":{}}}' \
| grep -A2 'mcp-jj'
# 3. 功能:新会话里应出现 mcp__jj__* 工具(已有会话的工具 schema 快照不含新
# MCP 工具是已知时序行为,以插件树为准)
工具(serverName jj → mcp__jj__)
| 工具 | 作用 | 关键参数 |
|---|---|---|
jj_status | 当前 change 摘要 + 工作区改动 | change (-r) |
jj_log | change 图(替代 git log) | limit/revset/noGraph |
jj_diff | 当前 change 或指定 change 的 diff | change/files |
jj_describe | 设置/更新描述(提交信息) | message/ |