Skip to main content

How to use dshcode

Adds a one-shot task profile to dsh: runs the Agent with a given task text, prints the final response, then exits. Designed for scripts and CI pipelines.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dshcode — @deepseek-ai/dsh-headless

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add @deepseek-ai/dsh-headless

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • macOS:在访达中右键点击应用并选择打开,然后在弹窗中确认。或者在终端执行一次 xattr -cr /Applications/DSHCode.app。
  • Windows:在 SmartScreen 弹窗中点击更多信息,然后选择仍要运行。
  • LINUX DO — 本项目也在 LINUX DO 社区持续分享与交流。
  • dsh-genui — 为内置生成式 UI 能力提供插件实现。
  • dsh-annotation — 为内置文本批注流程提供插件实现。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

What's the difference between this combo package and dsh-base?

base injects 60+ capabilities like basic tools, models, persistence as a 'factory default set'; headless only adds a minimal driver layer on top of base—no Host, HTTP server, Web runtime or browser plugin—each process takes one task, prints the final assistant text and exits 0/1.

What do process exit codes mean?

The final turn exits 0 when completed; exits 1 when aborted or error. In error cases, stderr additionally outputs one line 'dsh: : ', successful cases have empty stderr.

What happens if I run it without task text?

The launcher first prints usage error 'a task is required, for example: dsh --profile headless "run the tests"' and exits with 1, the runner is rejected before receiving the service, no Agent will be started.

Can this profile be used outside dsh launcher?

No. The runner must receive the exit request from the host before mounting; starting outside launcher will explicitly throw error 'headless-runner: the launcher must provide ctx.appExit before the tree mounts' upon activation.

Can multiple tasks run in one process?

No. Each dsh --profile headless invocation only submits one task and waits for it to return to idle; to run again you must restart a new process. The profile is nominally an interactive backend, but actually a single-shot task runner.

What's the default HMR and Code Mode status?

HMR is explicitly disabled in headless profile, Code Mode is controlled by DSH_TOOLS_MODE environment variable—the value determines whether to enable worker thread code execution (same source as Web profile).

Where is session data stored?

Handled by session-persistence-jsonl from the dsh-base layer, stored in $DSH_HOME/sessions; headless doesn't create additional storage.

What model does the Agent use?

Follows dsh-base's agent-default-model default value (deepseek-official / deepseek-v4-flash). To change models, simply override this line by id in your profile's cordis.patch.yml.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 未声明(本包与 dsh 1.0.5 同源发布)
  • Node: >=22.19.0(要求 ^22.19.0 或 >=24.0.0,源自仓库根 engines 字段)
  • Platforms: macOS, Linux, Windows

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule