Preface

Developers who work in the terminal all year round often have this need: typing a sentence directly in the terminal to see the model’s answer stream out, tool execution processes visible in real-time, and manual confirmation for sensitive operations—rather than switching to a browser or assembling output from a headless call. DeepSeek Harness (hereinafter dsh) supports specifying a profile at startup (e.g., dsh --profile cli). The dsh-simple-cli introduced below is a CLI profile that runs entirely in the terminal: after installation, use the dsh-cli command to chat with the Agent; the form is close to Claude Code.

What is this

dsh-simple-cli is a community plugin for dsh, maintained by kit-zeason, current version v0.1.2, under the MIT license. One-sentence positioning: Turn DeepSeek Harness into an interactive terminal chat similar to Claude Code, started with the dsh-cli command, equivalent to dsh --profile cli.

After installation, it does two things: writes the bundle to $DSH_HOME/profiles/cli (default ~/.dsh/profiles/cli) and installs a global dsh-cli command shim. Runtime dependencies resolve up the directory tree to dsh’s built-in shared profiles/node_modules, requiring no extra pnpm install.

Core Features

Stream Output

Assistant text, model reasoning (▸ reasoning, dark gray) and tool calls (⛭ name: args + ✓/✗ result) are all rendered in real-time. Reasoning is folded into the latest line during the thinking process, and rendering is merged to about 30fps to avoid terminal flickering during rapid output.

@ File Selector

Typing @ in the input box allows browsing the current working directory: type to filter, ↑/↓ to navigate, Enter to enter a folder or select a file, Esc to close. Once selected, @relative/path appears in the message; text files referenced upon submission are attached to the message—each text file is limited to 64 KB, with truncation and a hint if exceeded; binary files are only mentioned as paths.

Input Area and Status Bar

Enter to submit, Shift+Enter / Ctrl+Enter to insert a line break, supporting multi-line messages; ↑/↓ to navigate history or logical lines. Line break shortcuts rely on the kitty keyboard protocol (Windows Terminal 1.19+, kitty, WezTerm, iTerm2, Konsole, foot); unsupported terminals can use Ctrl+J or Alt+Enter as a fallback. The status bar below the input area permanently displays the current model and permission policy, visible at any time when switching commands.

Continuous Conversation and Tool Approval

Maintain multi-round context within a single Agent session. Under the ask permission policy, tool call approval is performed inline in the same input area: press y to allow once, n to deny, Enter to allow.

Built-in Commands

  • /new: Open a new session
  • /model: Switch model; bare /model opens a filterable selector; /model <provider>/<name> switches provider simultaneously
  • /preset: Switch agent preset
  • /permission ask|never: Switch approval policy, alias /perm
  • /clear, /help, /exit: Clear screen, help, exit (Ctrl+C also works)
  • First message can be passed as an argument at startup

Agent Presets

The preset mechanism is the same as the dsh web application, with four built-in: Standard (standard), PTC (code), Minimal (minimal), Creative (cordis), default is standard. To set a persistent default, configure the agent-presets.default item in $DSH_HOME/settings.yaml; custom presets are placed in the $DSH_HOME/.agent-presets/ directory.

Color Scheme

By default, each role (user, reasoning, tool call, status, etc.) has an independent color. If adjustment is needed, point the environment variable DSH_CLI_THEME to a JSON file with SGR parameter strings as the value:

{ "user": "1;92", "reasoning": "2;90", "toolCall": "33",
  "toolResult": "36", "toolError": "1;31", "system": "35", "status": "36" }

Installation and Enablement

First confirm the environment, then install dsh itself, and finally install the plugin.

Environment requirements:

  • Node.js ≥ 22 (tested on 24)
  • dsh ≥ 0.1.0-rc.6 is in PATH
  • PowerShell 5.1+ or pwsh, required to run install.ps1 (Windows and Unix both supported)

Install dsh itself:

npm i -g @deepseek-ai/dsh

Clone the repository and install:

git clone https://github.com/kit-zeason/dsh-simple-CLI.git
cd dsh-simple-CLI
.\install.ps1            # Install to $DSH_HOME/profiles/cli, install shim to PATH and verify
.\install.ps1 -Force     # Reinstall / overwrite existing profile files

If you don’t want to clone the repository, you can also just download install.ps1 to install a specific release version:

Invoke-WebRequest -Uri https://raw.githubusercontent.com/kit-zeason/dsh-simple-CLI/main/install.ps1 -OutFile install.ps1
.\install.ps1 -Version 0.1.0

-Version accepts 0.1.0 or v0.1.0; without the parameter, it installs the code in the current directory. The script installs the shim and verifies it; once successful, dsh-cli is usable.

Typical Usage

After the above steps, you can start directly:

dsh-cli                        # Start interactive chat
dsh --profile cli              # Same as above
dsh-cli "run the tests"        # Send the first task, then continue the conversation

Upon entering the interactive interface, the overall layout is as follows (README example):

┌───────────────────────────────────────────────┐
│ dsh-cli: DeepSeek Harness 交互模式(/help …)      │
│ ▸ 推理  let me check the repo layout…             │  ← 暗灰,流式
│ ⛭ pwsh: Get-ChildItem -Recurse .                │  ← 工具调用
│   ✓   Directory: …                              │  ← 工具结果
│ 这里是最新的文件清单:…                             │  ← 流式回复
│───────────────────────────────────────────────│
│ > 输入你的消息…  (Shift+Enter 换行, Enter 发送)     │  ← 输入区
│ 模型: deepseek/deepseek-v4-flash · 权限: ask   …  │  ← 状态栏
└───────────────────────────────────────────────┘

Daily operations are completed via commands in the input area:

/model deepseek-v4-flash       # Switch model within same provider
/model <provider>/<name>       # Switch provider and model simultaneously
/model                         # Open filterable model selector
/preset <id>                   # Switch preset; effective immediately in empty session, otherwise applied on /new
/permission ask                # or /permission never, switch approval policy (alias /perm)
/new                           # Open new session
/clear                         # Clear screen
/help                          # Help
/exit                          # Exit (Ctrl+C also works)

Applicable Scenarios and Notes

It suits two types of people: developers already using dsh who want to drive Agents directly in the command line; and those accustomed to the interaction form of Claude Code who want a similar experience on dsh. Pipeline/CI non-TTY stdin scenarios will degrade to normal reading and will not enter the interactive interface.

Three additional notes:

  1. Shift+Enter / Ctrl+Enter line breaks depend on kitty keyboard protocol; use Ctrl+J or Alt+Enter if the terminal is unsupported.
  2. @ attachments limit each text file to 64 KB, truncate with hint if exceeded; binary files are only mentioned as paths.
  3. Security: After plugin installation, it runs with the current dsh process’s permissions, capable of calling tools and reading/writing files. It is an MIT open-source community project with no official affiliation with DeepSeek / InfiniFlow; it is recommended to review the repository source code before installation to ensure behavior matches expectations before deployment.

Conclusion

dsh-simple-cli uses a single installation script to extend dsh with a terminal chat profile: streaming output, tool approval, multi-round context, @ attachments, presets, and color schemes are all configurable with low integration cost. Project addresses:

  • Directory page: https://www.skillhub.cn/plugins/kit-zeason/dsh-simple-CLI (Community-maintained independent site, no official affiliation with DeepSeek / InfiniFlow)
  • GitHub repository: https://github.com/kit-zeason/dsh-simple-CLI