Preface

In DSH workflows, there is often a need to pass shell command results to the model for evaluation: checking disk usage, viewing logs, running builds, or executing several commands consecutively before asking the model to analyze the process. A common approach is to run commands in an external terminal and manually copy the output to the model.

dsh-shell-command provides two entry points: /! for running a single command and analyzing its output; /terminal for opening an interactive terminal and referencing session records to the model as needed.

Plugin Positioning

dsh-shell-command is a DeepSeek Harness (DSH) plugin maintained by CHplus0, licensed under the MIT License.

It provides two commands:

  • /! <command>: Runs a shell command in the session workspace and sends the output to the model for analysis.
  • /terminal: Opens an interactive PTY terminal with Session and History tabs, supporting on-demand reference of historical sessions.

Core Features

/! Single Command Analysis

The design of /! references the ! gesture from Claude Code. Since DSH’s input trigger system only supports / and @ as trigger characters, /! is used here instead of a bare ! prefix.

When using /!:

  1. The command runs in the workspace of the current DSH session.
  2. The command output is boundary-processed and formatted into content suitable for model analysis.
  3. The command lifecycle is recorded in the trajectory.

Notes:

  • /! requires an existing model session; it is not available in the first message before the initial model request.
  • The command output will be sent to the model. Please verify the command and output content before use.

/terminal Interactive Terminal

/terminal opens an interactive PTY terminal popup with Session and History tabs.

When the session closes, content is not automatically sent to the model. If the session receives no input, no history entry will be created. If the session has received input, the session transcript will be saved to:

<workspace>/.dsh-shell-transcripts/

In the History tab, you can:

  • Select one or more historical sessions;
  • Add an optional description;
  • Send the selected session transcripts to the model for analysis.

The terminal input line supports ArrowUp / ArrowDown to recall previously submitted lines, stored locally on the client, with a maximum of 500 entries. Tab completion is not currently supported; full VT100/xterm support is planned for future versions.

The session transcript retention policy keeps the most recent 10 sessions per session ID, configurable via terminalTranscriptKeep. If you do not want transcripts to be included in version control, it is recommended to add .dsh-shell-transcripts/ to your .gitignore.

Installation and Activation

Before use, you need:

  • dsh CLI
  • Node >= 22

Installation command:

dsh plugin --profile web add dsh-shell-command

After installation, use /! or /terminal in the DSH input box.

Typical Usage

Analyzing a Single Command with /!

/! df -h

After the command runs, the output is sent to the model for analyzing disk usage.

/! git log --oneline -10

Can be used to have the model review recent commit history.

/! npm run build

Can be used to hand build output to the model for analysis.

Viewing and Referencing Terminal Sessions with /terminal

  1. Input:
/terminal
  1. Run the desired commands in the terminal.
  2. Click “Exit”.
  3. In the panel, switch to the History tab — the just-closed session will be preselected.
  4. Optionally add a description.
  5. Click “Reference and Analyze” to send the selected session transcripts to the model.

Applicable Scenarios and Considerations

Suitable for the following scenarios:

  • Quickly checking system status, files, Git status, or build results;
  • Executing commands first, then having the model explain the output;
  • Debugging step-by-step in the terminal, then handing the relevant transcripts to the model for analysis;
  • Comparing multiple terminal sessions and having the model analyze the differences.

Notes before use:

  • The plugin executes shell commands with the permissions available to the current dsh process; please verify the command content and runtime environment before execution.
  • It is recommended to review the source code and MIT License before installation.
  • /! is suitable for single commands that need immediate output analysis; /terminal is better suited for multi-step, exploratory operations.
  • Closing /terminal does not automatically send any content to the model.
  • Empty terminal sessions do not generate history entries.
  • Tab completion is not currently supported; some interactive full-screen programs may be limited by terminal support.

Acquisition

Plugin name: dsh-shell-command

GitHub:

https://github.com/CHplus0/dsh-shell-command

Directory page:

https://www.skillhub.cn/plugins/CHplus0/dsh-shell-command