PandaColour/dsh-cmd-starter
为deepseek-harness提供一个命令行启动工具,支持--append-prompt、--resume等类似claude的命令。
项目介绍Project Overview
dsh-cmd-starter 是 DeepSeek Harness 的无头调度 bundle,在官方 @deepseek-ai/dsh-headless 之上补充 Claude-Code 风格的 CLI 参数:-c 续会话、--resume 恢复、--name 别名、--append-prompt 临时追加提示词、--output-format json 输出含 sessionId 的结构化结果,覆盖 --provider/--model/--max-tokens/--effort。适用于用 subprocess 编排 dsh 的流水线场景。注意:--append-prompt 仅本次有效,不写会话历史;首次安装若 pnpm allowBuilds 拦截需手工补配。
dsh-cmd-starter is a headless scheduling bundle for DeepSeek Harness, layering Claude-Code-style CLI flags on top of the official @deepseek-ai/dsh-headless profile. It adds -c, --resume, --name, --append-prompt, --output-format json returning sessionId, and per-run --provider/--model/--max-tokens/--effort overrides. Use it when orchestrating dsh from Python pipelines via subprocess. Caveat: --append-prompt is process-scoped and never written to session history, and a first-time pnpm allowBuilds prompt may require a manual workspace edit.
请帮我了解并安装插件:【dsh-cmd-starter】【https://github.com/PandaColour/dsh-cmd-starter】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile headless add github:PandaColour/dsh-cmd-starter
把 PandaColour/dsh-cmd-starter 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-cmd-starter
Claude-Code 风格的 DeepSeek Harness 无头调度 bundle。它在官方 @deepseek-ai/dsh-headless profile 之上,把一次性任务入口升级成可脚本化的 CLI:
--append-prompt <text>:本次运行临时追加系统提示词(可重复;不落盘、不进会话历史)--resume <session-id>:恢复已有会话(支持 id 或--name别名)-c, --continue:续最近的会话--name <name>:给会话起持久化别名,之后--resume <name>恢复--output-format json:stdout 输出单行 JSON,含sessionId--provider / --model / --max-tokens / --effort:覆盖本次运行的模型参数
为什么做这个
这个插件是为了支持 panda-pipline 而开发的。panda-pipline 是一个用 Python 直接驱动 Claude / Codex / Cursor 这类编码 agent,把它们编排成流水线干活的框架。
dsh-cmd-starter 的角色,是让 DeepSeek Harness 也能被同一套 Python 流水线驱动——通过补齐 Claude-Code 风格的 --resume / --continue / --name / --append-prompt / --output-format json 调度参数,使 dsh 在 Python 眼里和 claude / codex / cursor 一样,是一个「可以用 subprocess.Popen 启动、带结构化输出、能按会话恢复」的可编排单元。
安装
要求:Node ^22.19 || >=24,已全局安装 dsh(npm i -g @deepseek-ai/dsh@next)。
dsh plugin --profile headless add github:PandaColour/dsh-cmd-starter
首次
add若因 pnpm 的allowBuilds拦截,按提示在~/.dsh/profiles/headless/pnpm-workspace.yaml里补allowBuilds键后重跑。
用法
# 一次性任务(等价官方 headless)
dsh --profile headless "run the tests"
# 本次运行临时加一条系统提示词(可多次 --append-prompt)
dsh --profile headless --append-prompt "be terse" "explain this code"
# 输出 JSON,含 sessionId(供 Python 抓取)
dsh --profile headless --output-format json "run the tests"
# => {"sessionId":"session-xxx","finalResponse":"...","finishReason":"completed"}
# 恢复会话 / 续最近会话
dsh --profile headless --resume session-xxx "continue"
dsh --profile headless -c "continue"
# 命名会话,之后按名字恢复
dsh --profile headless --name review "review this PR"
dsh --profile headless --resume review "continue the review"
# 覆盖模型参数
dsh --profile headless --provider deepseek-official --model deepseek-v4-flash --max-tokens 8192 "task"
与 Claude CLI 的对应关系
| Claude CLI | dsh-cmd-starter |
|---|---|
claude -p "prompt" |
dsh --profile headless "prompt" |
claude -r <name> |
dsh --profile headless --resume <session-id-or-name> |
claude -c |
dsh --profile headless -c "..." |
claude -n, --name <name> |
dsh --profile headless --name <name> "..." |
claude --append-system-prompt <t> |
dsh --profile headless --append-prompt <t> |
claude --output-format json |
dsh --profile headless --output-format json |
claude --model <m> |
dsh --profile headless --provider <p> --model <m> |
语义说明
--append-prompt是临时的:通过 agent 作用域的systemPrompt.section()注入,进程退出即消失,绝不写入 session 日志。连续两次运行互不残留;只有--resume/-c才会延续对话历史。--name的别名是持久的:存在$DSH_HOME/cmd-starter/aliases.json(原子写),跨进程有效。--resume <value>先查别名表,命中就映射到 session id,未命中就把<value>当 session id。别名只指向 session,不进入会话历史。--output-format json的字段(命名对齐 SDK 协议):sessionId(驼峰)、name(仅--name时)、finalResponse、finishReason(completed | max-tokens | blocked | aborted | error)、errorCode(仅 error 时)。
Python 调度
感谢支持
联系方式: https://github.com/PandaColour/dsh-cmd-starter/blob/HEAD/panda.colour@qq.com
yejiming/MuseAI
Minglink/dsh-infinite-gen-2
FSMargoo/dsh-at-file
superdesigndev/superdesign-skill
bugmaker2/dsh-plugin-template
Rain-kl/dsh-preset-plus