Introduction¶
In the DSH (DeepSeek Harness) Web plugin ecosystem, you may sometimes need to execute commands in the browser. The traditional approach is to open a local terminal, which breaks the contextual connection with the current chat or task. dsh-console solves this problem by providing a real PTY terminal through the Web interface.
This is a community-maintained plugin designed to let developers operate the command line directly without leaving the Web interface.
Core Features¶
dsh-console integrates terminal capabilities into the main DSH view:
- Main view “Console” tab: Same level as tabs such as “Chat” and “Trajectory,” with an iTerm-style dark multi-tab bar design.
- True PTY interactive terminal: Built on
node-pty, supporting all interactive programs such asvim,top,htop, andCtrl+C. - User’s real shell environment: Inherits the user’s login shell (
$SHELL -l), full environment variables, and 256-color support. This ensures that conda environments and git status prompts display correctly. - No output loss: Uses a 512KB ring buffer on the host side, combined with SSE (Server-Sent Events) streaming. Even after switching tabs, refreshing the page, or reconnecting, the terminal’s historical output is automatically replayed and restored.
- Multi-tab management: Supports creating tabs with
+and closing tabs with×. Each tab displays an independent PID and geometry size, with a green-dot liveness indicator.
Installation and Enablement¶
Installation is very simple. The official one-click script is recommended.
# 1. 进入插件目录
cd dsh-console
# 2. 执行安装脚本
./install.sh
# 3. 重启 DSH
The install.sh script automatically performs the following three actions:
* Copies the plugin files to ~/.dsh/profiles/web/node_modules/dsh-console.
* Appends dsh-console to dsh.profile.bundles in ~/.dsh/profiles/web/package.json.
* Prompts you to restart DSH.
Typical Usage¶
After installation and restarting DSH, follow these steps:
- Open the DSH Web interface in your browser at
http://127.0.0.1:3080. - Enter any session. A “Console” tab will appear in the top tab bar, located between “Trajectory” and “Task Panel”.
- Click
+or the “New Terminal” button to create a new tab. - Type commands directly in the terminal to perform interactive operations.
Applicable Scenarios and Notes¶
- Environment dependencies: Building the plugin requires Node.js >= 18, but running the prebuilt plugin package does not.
- Session lifecycle: PTY sessions are bound to the DSH process. When DSH restarts, all terminal tabs are terminated as if the windows were closed. Please make sure to save your work.
- Known limitations:
- The terminal window size is fixed at 120×34, and dynamic resize is not yet supported.
- The terminal title is fixed as “Terminal N”. Dynamic updating via OSC title sequences is not currently supported.
dsh-console provides a direct path from the Web interface to the command line, making it suitable for quickly debugging scripts or running background tasks within the DSH environment.