worktree-mgr
dsh 插件:为任务自动创建隔离的 git 工作区,管理 创建/同步/收尾 全生命周期
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JohnXu22786/worktree-mgr说明文档
阅读完整 README ↗Configuration
Precedence (low → high): **built-in defaults /| Directory for task workspaces and the ledger; relative paths resolve against the repo path | |prefix|wtm| Branch prefix; derived branches are
/| |commitMessage|chore(wtm): snapshot {task}| Snapshot commit template, placeholders{task} {branch} {base}| |mergeMessage|merge(wtm): fold {task} into {base}` | Merge commit template |
Environment variables: WTM_ROOT (effective for both tools and CLI), WTM_VAULT, WTM_PREFIX, WTM_COMMIT_MESSAGE, WTM_MERGE_MESSAGE (WTM_ROOT has lower precedence than tool parameters and plugin config).
Repository-level config /.wtm.json
{
"prefix": "wtm",
"vault": "D:/wtm-vaults",
"commitMessage": "chore(wtm): snapshot {task}",
"mergeMessage": "merge(wtm): fold {task} into {base}",
"seed": { "files": ["docs/AGENTS.md"] },
"triggers": {
"on_begin": ["pnpm install"],
"on_merge": ["pnpm lint"],
"on_finish": []
}
}
vaultmust be outside the repository working tree (otherwise the vault directory would keep dirtying the main workspace, and the plugin refuses outright);seed.files: files copied from the main repository into the workspace when the task workspace is created (e.g. team convention docs); paths must stay within the repo/workspace — out-of-bounds entries are intercepted with a warning;triggers.*: lifecycle hook command arrays, see "Events/hooks interface" above.
Unknown keys produce a warning and are ignored; a corrupted .wtm.json never blocks operations, only warns.