dsh-shell-command
In a curated listMaintenance: Activechplus0/dsh-shell-command
DeepSeek Harness (DSH) plugin: a /! command trigger (run one command, analyze output, inspired by Claude Code's ! gesture) and a /terminal command (interactive PTY popup with on-demand history reference).
$ dsh plugin add dsh-shell-commandInstall
dsh has no central install command — add this plugin’s entry (documented in its README) to your profile or patch config, then restart.
How installs work5
stars
0
forks
JavaScript
Language
MIT
License
2026-08-16
Created
2026-10-19
Last push
README
dsh-shell-command
English | 中文
A DeepSeek Harness plugin that brings Claude Code's ! gesture to DSH, split into two modes:
| Command | Behavior |
|---|---|
/! <command> |
Run a shell command, analyze its output. Inspired by Claude Code's ! prefix — runs the command in the session workspace and delivers the output to the model for immediate analysis. |
/terminal |
Open an interactive terminal popup. Closing never sends anything to the model — if the session received input, the transcript persists and the panel jumps to a history tab (new entry pre-selected) where you can reference it into the model on demand. |
Note: DSH's input trigger system only supports / and @ as trigger characters, so we use /! instead of a bare ! prefix.
Install
Requires the dsh CLI and Node >= 22.
# from a registry / npm
dsh plugin --profile web add dsh-shell-command
# from a local checkout (live link for development)
dsh plugin --profile web add "link:/path/to/dsh-shell-command"
Restart the web surface once (dsh web) so the host-side command loads. It appears in the input / menu automatically.
Quick Start
Your first /! command
Type in the input box:
/! df -h
The command runs immediately, and the output is delivered to the model for analysis. You'll see a message like:
Shell Command Output
Command:df -h
[output here]
The model then analyzes the disk usage and may suggest actions if issues are found.
Your first /terminal session
- Type
/terminalin the input box - A floating terminal panel opens with two tabs: 会话 (Session) and 历史 (History)
- In the Session tab, try some commands:
pwd ls -la git status - Click 退出 (Exit) in the header to close the terminal
- The panel stays open and automatically jumps to the History tab
- Your just-closed session is pre-selected and expanded
- Choose what to do:
- Click 引用并分析 to send it to the model for analysis
- Click 直接退出,本次不分析 to skip and close the panel
Command Details
/! <command> — Single-command analysis
Runs the command in your session workspace and immediately delivers the output to the model for analysis. This is the DSH equivalent of Claude Code's ! prefix.
When to use:
- Quick status checks:
/! git status,/! npm test - System diagnostics:
/! df -h,/! free -h,/! top -bn1 | head -20 - File searches:
/! find . -name "*.log" -mtime -1 - One-off operations where you want immediate AI insight
Examples:
/! git log --oneline -10
# → Model summarizes recent commits and may spot patterns
/! npm run build
# → Model analyzes build output, flags warnings or errors
/! ps aux | grep node
# → Model explains running Node processes
Technical details:
- Output is bounded (
maxOutputBytes, tail retained) and formatted for analysis - The command text and lifecycle are logged to the trajectory (
command/run/command/done) - Requires an active model conversation (won't work on the first message before any model request)
/terminal — Interactive terminal
An interactive PTY popup (persistent shell, live WebSocket stream). Best for:
- Exploratory debugging: run multiple commands, observe behavior
- Iterative testing: modify → test → modify cycles
- Multi-step operations: setup → execute → verify workflows
How it works:
Closing the terminal never sends anything to the model automatically:
- If the session never received input → no trace left (no file, no history entry)
- If the session received input → transcript persists to
<workspace>/.dsh-shell-transcripts/, panel jumps to History tab with the new entry pre-selected
You decide later whether to reference it for analysis (see History Tab workflow below).
Session Tab Features
- Line-oriented terminal: monospace scrollback + input line
- Control keys: Ctrl+C/D/Z send raw control bytes to the shell
- Command history: ArrowUp/ArrowDown recall previously-submitted lines (client-side, max 500 entries)
- Limitations: Tab-completion not supported; full VT100/xterm (vim, htop) planned for future release
History Tab Workflow

When you close a terminal session that received input, the panel automatically switches to the History tab:
UI Elements:
- Checkbox (left): Select one or more history entries for analysis
- Timestamp: When each session was closed
- View/Collapse button (right): Expand to preview the transcript
- Notes textarea (bottom): Optional natural-language context for the model
- Default message hint: Shows what the model receives if you leave notes empty: "请帮我分别分析这些历史终端记录。"
- Two action buttons:
- 引用并分析 ("Reference & Analyze"): Send selected entries to the model for immediate analysis
- 直接退出,本次不分析 ("Exit without analyzing"): Close the panel without sending anything
Typical workflow:
1. Close a terminal session (click "退出")
2. Panel stays open, jumps to History tab
3. Just-closed entry is pre-selected and auto-expanded
4. Review the transcript preview
5. (Optional) Select additional historical entries for comparison
6. (Optional) Add context in the notes field: "Why did the second run fail?"
7. Click "引用并分析" → Model analyzes selected transcripts
OR click "直接退出,本次不分析" → Panel closes, nothing sent to model
Advanced usage:
- Compare across runs: Select 2-3 related sessions (e.g., before/after a fix) and ask: "What changed between these attempts?"
- Guided analysis: Use the notes field to direct the model's attention: "Focus on memory usage patterns"
- Selective sharing: Not every terminal session needs analysis — only reference what's relevant
More in CLI & Terminal
deepseek-harness-docker
by runzhliu
Community Docker and Kubernetes packaging for DeepSeek Harness (@deepseek-ai/dsh), with a hardened image, Compose stack, Helm chart, Web UI, and headless CLI.
deepseek-harness-android
by dphmoblie
Android app for managing a local DeepSeek Harness Ubuntu user space: runtime install/reset, Ubuntu terminal, optional Shizuku shell, and an embedded loopback-only Harness web UI.
dsh-subagent-codex
by mjylfz
Adds a subagent_codex tool that delegates tasks to the local OpenAI Codex CLI, running the work in an isolated external process.
mnemon
by mnemon-dev
LLM-supervised persistent memory for AI agents — graph-based recall, cross-session knowledge, single binary. Works with DeepSeek Harness, Claude Code, OpenClaw, and any agent runtime.
