首页 › LLM大语言模型 › Deepseek › DeepSeek Harness › DeepSeek Harness 命令参考

DeepSeek Harness 命令参考

dsh 是 DSH 的命令行入口。命令不多,但有几条"顺序规则"必须懂,否则参数会被误解。这一篇是可查的速查表,覆盖日常会用到的全部命令。​

​

飞书文档 - 图片

​

核心命令速查​

​

#wMFphDsOrnQK text { white-space: pre; }#wMFphDsOrnQK .fb0 { stroke: var(--N900-FG, 0.15); }#wMFphDsOrnQK .fb0 {stroke: rgba(31,35,41, 0.15)}#wMFphDsOrnQK .fx0 { stroke-miterlimit: 10; }#wMFphDsOrnQK .fx0 {stroke-miterlimit: 10}#wMFphDsOrnQK .fa1 { fill: rgb(187, 191, 196); }#wMFphDsOrnQK .fa1 {fill: rgb(187, 191, 196)}#wMFphDsOrnQK .fx1 { font: 400 12px MonospacedNumber, LarkHackSafariFont, LarkEmojiFont, LarkChineseQuote, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Tahoma, "PingFang SC", "Microsoft Yahei", Arial, "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }#wMFphDsOrnQK .fx1 {font-style: normal}#wMFphDsOrnQK .fx2 { text-anchor: middle; }#wMFphDsOrnQK .fx2 {text-anchor: middle}#wMFphDsOrnQK .fx3 { dominant-baseline: central; }#wMFphDsOrnQK .fx3 {dominant-baseline: central}#wMFphDsOrnQK .fx4 { stroke: none; }#wMFphDsOrnQK .fx4 {stroke: none}#wMFphDsOrnQK .fc0 { fill: var(--text-caption); }#wMFphDsOrnQK .fc0 {fill: #646a73}#wMFphDsOrnQK .fa2 { fill: var(--text-link-disabled); }#wMFphDsOrnQK .fa2 {fill: rgb(187, 191, 196)}#wMFphDsOrnQK .fa3 { fill: rgb(241, 245, 249); }#wMFphDsOrnQK .fa3 {fill: rgb(241, 245, 249)}#wMFphDsOrnQK .fc1 { stroke: var(--B500); }#wMFphDsOrnQK .fc1 {stroke: #336df4}#wMFphDsOrnQK .fx5 { font: 400 16px MonospacedNumber, LarkHackSafariFont, LarkEmojiFont, LarkChineseQuote, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Tahoma, "PingFang SC", "Microsoft Yahei", Arial, "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }#wMFphDsOrnQK .fx5 {font-style: normal}#wMFphDsOrnQK .fx6 { text-anchor: start; }#wMFphDsOrnQK .fx6 {text-anchor: start}#wMFphDsOrnQK .fx7 { dominant-baseline: alphabetic; }#wMFphDsOrnQK .fx7 {dominant-baseline: alphabetic}#wMFphDsOrnQK .fc2 { fill: rgb(30, 41, 59); }#wMFphDsOrnQK .fc2 {fill: rgb(30, 41, 59)}#wMFphDsOrnQK .fx8 { font: 400 16px LarkHackSafariFont, LarkEmojiFont, ui-monospace, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Noto Sans", Tahoma, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", STHeiti, SimHei, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", system-ui; }#wMFphDsOrnQK .fx8 {font-style: normal}#wMFphDsOrnQK .fc3 { fill: rgb(0, 0, 0); }#wMFphDsOrnQK .fc3 {fill: rgb(0, 0, 0)}#wMFphDsOrnQK .fx9 { font: 400 15px LarkHackSafariFont, LarkEmojiFont, ui-monospace, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Noto Sans", Tahoma, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", STHeiti, SimHei, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", system-ui; }#wMFphDsOrnQK .fx9 {font-style: normal}#wMFphDsOrnQK .fc4 { fill: var(--B500); }#wMFphDsOrnQK .fc4 {fill: #336df4}#wMFphDsOrnQK .fx10 { font: 400 15px MonospacedNumber, LarkHackSafariFont, LarkEmojiFont, LarkChineseQuote, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Tahoma, "PingFang SC", "Microsoft Yahei", Arial, "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }#wMFphDsOrnQK .fx10 {font-style: normal}#wMFphDsOrnQK .fb1 { fill: var(--N900-FG, 0.15); }#wMFphDsOrnQK .fb1 {fill: rgba(31,35,41, 0.15)}#wMFphDsOrnQK .fb2 { fill: rgb(226, 232, 240); }#wMFphDsOrnQK .fb2 {fill: rgb(226, 232, 240)}#wMFphDsOrnQK .fa4 { fill: var(--bg-body); }#wMFphDsOrnQK .fa4 {fill: #fff}AB123456789命令作用dsh webdsh --profile dsh --profile headless "任务"dsh plugin --profile dsh --helpdsh --dump-default-configdsh --dump-configdsh --patch 启动 Web UI(即),默认 启动指定 profile(见)一次性任务:跑完打印最终回答并退出管理 profile 插件(转发给 pnpm)启动器自己的帮助打印内置默认配置(未叠加 patch)打印叠加所有层后的最终配置用一次性覆盖层启动(不改文件)--profile webhttp://127.0.0.1:3080Profile 是什么?

​

最重要的规则:flag 必须写在最前面​

启动器只认识自己的 flag(--profile、--patch、配置 dump),从第一个不认识的内容开始,后面全部属于应用参数:​

​

代码块​

Plain Text

dsh --profile web --port 8080 # --port 是 web 应用的参数 ✓​

dsh --port 8080 --profile web # 错:--port 会成为……应用的第一个参数,启动器看不到 --profile​

dsh --profile headless "run the tests" # 任务文本是应用参数​

dsh --profile web --help # 看 web 应用自己的参数​

dsh --help # 看启动器的参数​

​

判断口诀:启动器的东西在最前,应用的东西在后。​

常用组合示例​

​

代码块​

Plain Text

# 日常:开 Web UI​

dsh web​

​

# 一次性:让 agent 总结仓库​

dsh --profile headless "Summarize this repository and identify its main packages."​

​

# 排查:看当前配置到底长什么样​

dsh --dump-config​

​

# 加插件:给 web profile 装社区插件​

dsh plugin --profile web add dsh-some-plugin​

​

退出码的含义​

•

headless 任务正常完成(最终轮次结束)→ 退出码 0​

•

其余情况(配置错误、启动失败、任务失败)→ 非零退出​

写脚本时可以直接用退出码判断成败。​

常见问题​

​

#NrVXqrUqZHwn text { white-space: pre; }#NrVXqrUqZHwn .fb0 { stroke: var(--N900-FG, 0.15); }#NrVXqrUqZHwn .fb0 {stroke: rgba(31,35,41, 0.15)}#NrVXqrUqZHwn .fx0 { stroke-miterlimit: 10; }#NrVXqrUqZHwn .fx0 {stroke-miterlimit: 10}#NrVXqrUqZHwn .fa1 { fill: rgb(187, 191, 196); }#NrVXqrUqZHwn .fa1 {fill: rgb(187, 191, 196)}#NrVXqrUqZHwn .fx1 { font: 400 12px MonospacedNumber, LarkHackSafariFont, LarkEmojiFont, LarkChineseQuote, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Tahoma, "PingFang SC", "Microsoft Yahei", Arial, "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }#NrVXqrUqZHwn .fx1 {font-style: normal}#NrVXqrUqZHwn .fx2 { text-anchor: middle; }#NrVXqrUqZHwn .fx2 {text-anchor: middle}#NrVXqrUqZHwn .fx3 { dominant-baseline: central; }#NrVXqrUqZHwn .fx3 {dominant-baseline: central}#NrVXqrUqZHwn .fx4 { stroke: none; }#NrVXqrUqZHwn .fx4 {stroke: none}#NrVXqrUqZHwn .fc0 { fill: var(--text-caption); }#NrVXqrUqZHwn .fc0 {fill: #646a73}#NrVXqrUqZHwn .fa2 { fill: var(--text-link-disabled); }#NrVXqrUqZHwn .fa2 {fill: rgb(187, 191, 196)}#NrVXqrUqZHwn .fa3 { fill: rgb(241, 245, 249); }#NrVXqrUqZHwn .fa3 {fill: rgb(241, 245, 249)}#NrVXqrUqZHwn .fx5 { font: 400 16px MonospacedNumber, LarkHackSafariFont, LarkEmojiFont, LarkChineseQuote, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Tahoma, "PingFang SC", "Microsoft Yahei", Arial, "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }#NrVXqrUqZHwn .fx5 {font-style: normal}#NrVXqrUqZHwn .fx6 { text-anchor: start; }#NrVXqrUqZHwn .fx6 {text-anchor: start}#NrVXqrUqZHwn .fx7 { dominant-baseline: alphabetic; }#NrVXqrUqZHwn .fx7 {dominant-baseline: alphabetic}#NrVXqrUqZHwn .fc1 { fill: rgb(30, 41, 59); }#NrVXqrUqZHwn .fc1 {fill: rgb(30, 41, 59)}#NrVXqrUqZHwn .fx8 { font: 400 15px LarkHackSafariFont, LarkEmojiFont, ui-monospace, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, "Noto Sans", Tahoma, "Nimbus Sans L", Arial, "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", STHeiti, SimHei, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", system-ui; }#NrVXqrUqZHwn .fx8 {font-style: normal}#NrVXqrUqZHwn .fc2 { fill: rgb(0, 0, 0); }#NrVXqrUqZHwn .fc2 {fill: rgb(0, 0, 0)}#NrVXqrUqZHwn .fb1 { fill: var(--N900-FG, 0.15); }#NrVXqrUqZHwn .fb1 {fill: rgba(31,35,41, 0.15)}#NrVXqrUqZHwn .fb2 { fill: rgb(226, 232, 240); }#NrVXqrUqZHwn .fb2 {fill: rgb(226, 232, 240)}#NrVXqrUqZHwn .fa4 { fill: var(--bg-body); }#NrVXqrUqZHwn .fa4 {fill: #fff}AB1234问题解答--help--profile --help--help--patch 显示的不是我要的命令?想临时改配置不影响文件?headless 任务卡住?加 后 显示的是该应用参数;裸 是启动器用 一次性覆盖层它等 agent 完成全部工作才退出,长任务属正常

​

​