dsh-simple-cli turns DeepSeek Harness (dsh) into an interactive terminal chat, like Claude Code: type a message, watch the answer stream in, keep the conversation going. It is launched as the dsh-cli command (equivalent to dsh --profile cli).
dsh ships with web / headless profiles. This repo adds a cli profile that runs entirely in the terminal, Claude-Code style:
Streaming output with reasoning & tool calls — assistant text, model reasoning (▸ 推理, dim gray) and tool invocations (⛭ name: args + ✓/✗ result) stream in live, matching the TUI experience. Reasoning is collapsed to its latest line while thinking (web-style) and renders are coalesced to ~30fps, so fast thinking does not flicker the terminal
@ file picker — type @ in the input to browse the working directory (type to filter, ↑/↓ navigate, Enter enters a folder or picks a file, Esc closes); picking inserts @relative/path, and on submit each referenced text file is attached to the message (up to 64 KB each, truncated with a note; binary files stay as a path mention)
── input area — a separator line frames the input box; Enter submits, Shift+Enter / Ctrl+Enter insert a newline (multi-line messages; requires the kitty keyboard protocol — Windows Terminal 1.19+, kitty, WezTerm, iTerm2, Konsole, foot — otherwise Ctrl+J or Alt+Enter work as a fallback), ↑/↓ navigate history or logical lines
Status bar — under the input: current model & permission, with the switching commands always in view
Continuous conversation — multi-turn context on a single Agent session
Tool-call approvals — inline / / Enter on the same input area under the "ask" policy
dsh-simple-cli · DSH Hub
y
n
Commands — /new fresh session · /model [provider/] switch model (bare /model opens a filterable picker) · /preset [id] switch agent preset (bare /preset opens a filterable picker) · /permission ask|never switch approval policy · /clear · /exit; an optional first message can be passed as an argument
Default color scheme — every role has its own color (user green, reasoning gray, tools yellow/cyan…); override via the DSH_CLI_THEME env var (see below)
Requirements
Node.js ≥ 22 (tested on 24)
dsh ≥ 0.1.0-rc.6 on PATH: npm i -g @deepseek-ai/dsh
PowerShell 5.1+ / pwsh for install.ps1 (Windows & Unix)
dsh-cli # start interactive chat
dsh --profile cli # same
dsh-cli "run the tests" # send a first task, then keep chatting
┌───────────────────────────────────────────────┐
│ dsh-cli: DeepSeek Harness 交互模式(/help …) │
│ ▸ 推理 let me check the repo layout… │ ← dim gray, streaming
│ ⛭ pwsh: Get-ChildItem -Recurse . │ ← yellow
│ ✓ Directory: … │ ← cyan
│ 这里是最新的文件清单:… │ ← streaming reply
│───────────────────────────────────────────────│
│ > 输入你的消息… (Shift+Enter 换行, Enter 发送) │ ← input area
│ 模型: deepseek/deepseek-v4-flash · 权限: ask … │ ← status bar
└───────────────────────────────────────────────┘
Commands (type them in the input area):
Command
Effect
/model
open the model picker (browse or keyword-search, then pick)
/model
switch model (same provider), e.g. /model deepseek-v4-flash
`/model
/`
switch provider + model
/preset
open the preset picker (标准 / PTC / 极简 / 创造 + your own)
/preset
switch preset (live on a blank session, else applies on /new)
/permission ask / never
switch the approval policy (aliases: /perm)
/new
start a fresh session
/clear
clear the scrollback
/help, /exit
help / quit (Ctrl+C also quits)
Presets: each session is composed from one DSH agent preset (the same mechanism as the web app — 标准/standard, PTC/code, 极简/minimal, 创造/cordis). The default is standard; set a persistent default in $DSH_HOME/settings.yaml under agent-presets.default, and author your own presets in $DSH_HOME/.agent-presets/ (a directory with agent.cordis.yml + optional preset.yml).
Tool approval prompt (inline on the same input area):
? [授权] pwsh: … — y 允许一次 / n 拒绝 / 回车 允许
Color scheme (override via env DSH_CLI_THEME= ; each value is an SGR parameter string):
Bundle resolution (resolveBundleDir) checks the dsh install directory first, then the profile's own node_modules — so dropping the bundle at profiles/cli/node_modules/dsh-simple-cli is enough.
Dependencies — every runtime import (@deepseek-ai/dsh-agent, dsh-llm, dsh-session, schemastery, commander, …) resolves up the directory tree into the shared profiles/node_modules that ships with dsh. No pnpm install needed.
Runner — lib/index.js creates one Agent through the core registry, then renders the session/event firehose live: assistant/chunk deltas stream reasoning / text / tool-call arguments, tool/call + tool/result draw the tool lines, and approval/request is answered inline on the same input area. Non-TTY stdin (pipes / CI) falls back to a plain readline loop.
UI — lib/ui.js is a dependency-free raw-mode mini-TUI (ANSI only): scrollback + ── separator + multi-line editor + status bar; lib/theme.js holds the palette.
Note — dsh rewrites the profile's cordis.yml to [] on every launch; keep your changes in cordis.patch.yml.