ClausYang
dsh-bang-shell
No description
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 14, 2026
- Updated
- Aug 17, 2026
Introduction
dsh-bang-shell
中文 | English
Run a shell command directly from the DeepSeek Harness Web composer with a leading ! — the command is not sent to the model. It executes in the current session workspace and lands in the conversation as a durable command card.
Highlights
- Typing the first
!instantly switches the line to terminal colors (an amber!prompt glyph plus green command text, no background tint, light/dark theme aware) — the mode change is visible from the first keystroke; - Enter executes it: stdout / stderr / timeout & signal markers / exit code render as a persistent command card visible across tabs, with zero model tokens spent.
Usage
!pwd
!git status
!pnpm test
- Only a message whose first non-whitespace character is
!is intercepted; inline!never triggers; - A bare
!keeps the draft and asks for a command; - Commands run through DSH's active
ctx.shellexecutor, inheriting its timeout and sandbox policy; - A non-zero exit renders an error command card — never an AI turn.
Install
Prerequisite: a DSH core that includes the ! trigger extension (TriggerChar, detectTrigger, input adjudication; see "Core companion changes" below). On a checkout that has it:
dsh plugin --profile web add /path/to/dsh-bang-shell
Restart dsh web, then refresh the browser page.
Core companion changes
The ! trigger character requires a small extension (~20 lines, all test-first) to the DeepSeek Harness input pipeline:
packages/client/ui-input-trigger:TriggerChargains'!';detectTriggerrecognizes!packages/client/ui-conversation:InputMachine.onEnterroutes!drafts into adjudication; the decoration core gains abangrange; InputBar renders it dual-color (amber!+ green command, no background)
Development
DSH_CHECKOUT=/path/to/deepseek-harness npm run build
npm test
The build reuses the DSH checkout's toolchain (tsc + tsdown + the clientBundle preset) with zero extra npm dependencies.
Known limitations
- Depends on the core
!trigger extension; the browser half stays inert on DSH builds without it; - Output renders through the generic command card (
command/donetext); no dedicated terminal block yet; - Multi-line drafts submit as one line; shell history expansion (
!!) is not supported.