dsh-tui
DeepSeek Harness, in your terminal.
dsh-tui is a full terminal front end for DeepSeek Harness, not a shim over one. It installs as an ordinary DSH profile, so it boots the same host as the Web and Desktop surfaces — the same base composition, providers, credentials, plugins, settings, and tools — and draws the whole thing with Ink.
██████╗ ███████╗██╗ ██╗
██╔══██╗██╔════╝██║ ██║ DSH // CODING HARNESS
██║ ██║███████╗███████║
██║ ██║╚════██║██╔══██║ ❯ fix the flaky test
██████╔╝███████║██║ ██║
╚═════╝ ╚══════╝╚═╝ ╚═╝ ◆ the retry wrapper was racing the timeout; patched…
╭─ ❯ YOU ─────────────────────────────────────────────╮
│ fix the flaky test │
╰─────────────────────────────────────────────────────╯
╭─ larper · deepseek-v4.1-flash · █ max · ~/project · main ↑2 ─── 1.2M ──╮
│ ❯ ▏ │
╰──────────────────────────────────────────────────────────── ctrl+s tasks ───╯
Quick start
npm install -g @deepseek-ai/dsh@latest # the Node-hosted harness
npm install -g @d0nj/dsh-tui # this terminal surface
dsh-tui # launch it
That is the whole setup. The package is a real DSH plugin plus its dsh-tui/dst launcher. The first run auto-initializes the tui profile (this needs pnpm), then launches your Node-hosted harness. To register it manually in an existing profile instead: dsh plugin --profile tui add @d0nj/dsh-tui; afterwards dsh-tui and dsh --profile tui are equivalent.
Why dsh-tui
- The real harness. Same host, providers, credentials, MCP plugins, settings, and tools as every other DSH surface. Token accounting, context pressure, and session stats come from the same projections the Web and Desktop clients use.
- A deck that never floats. The chat owns the alternate screen and lays out as a fixed-height document: the deck is always the terminal's last rows, the transcript scrolls in place, and drag-select keeps the range highlighted for
ctrl+cor right-click copy. - Smooth where it matters. The boot card is driven by a helper process while the host loads, then hands off to the chat card in the same spot. Full-screen frames are diffed row by row, so animations repaint only the lines that changed.
- Built for long sessions. Tool cards with syntax-highlighted output and red/green diff bands, Claude Code-style background tasks with one
/taskssheet, live compaction feedback,/shaketo prune oversized tool results, steering and message queues, and a waiting dock that keeps you informed with a spinner verb and the elapsed clock. - Everything DSH ships. Approvals, questions, slash commands, skills, presets, jobs, schedules, workspaces, and model/theme/effort pickers — in the terminal.
- Batteries included. Persistent JavaScript and Python
evalcells, and a real Chromiumbrowsertool with automation tells suppressed. - Your setup sticks. Reasoning visibility, todo HUD, expanded tool output, and theme are remembered across launches in
$DSH_HOME/tui/preferences.json.
Install
Requirements
- Node.js 20+
- Node.js 20+ and
pnpm\n- the Node build of@deepseek-ai/dsh(npm install -g @deepseek-ai/dsh; the Desktop app runtime cannot host the terminal UI) - A truecolor terminal: Kitty, iTerm2, Windows Terminal, Ghostty, or WezTerm
- Python 3.8+ only if you use Python
evalcells; Chromium is downloaded on first use of thebrowsertool
Profile setup
dsh-tui install
This creates a minimal tui profile: the dsh-base and dsh-web-app host bundles plus the terminal surface. Nothing is copied from your other profiles. To add plugins, use the profile like any other:
dsh plugin --profile tui add <package>
# or edit ~/.dsh/profiles/tui/cordis.patch.yml
Run
dsh-tui # new session
dsh-tui --continue # most recent session in this directory
dsh-tui --resume <id> # a specific saved session
dsh-tui --model deepseek-v4.1-flash --effort max
From a checkout
bun install
bun run build
bun run install:profile
bun run start
All flags
| Flag | Meaning |
|---|---|
--cwd <dir> | working directory for a new session |
--resume <id> | open a saved session |
--continue | open the most recent session for the directory |
--model <model> | model id or provider/model |
--effort <level> | reasoning effort for the selected model |
--theme <name> | deepseek (default), basalt, obsidian, dark, limestone, light |
--symbols <preset> | glyphs: nerd (default), unicode, ascii |
--ascii | shorthand for --symbols ascii |
--yolo | approve permission requests automatically |
--no-splash | boot without the welcome card (the loader still animates) |
Permission modes
/mode follows the harness sandbox policy and applies to the current session; before the first message it applies to the next one.
| Mode | Sandbox | Approvals |
|---|---|---|
/mode write | workspace-write (default) | ask outside the workspace |
/mode read | read-only | ask |
/mode yolo | danger-full-access | auto-approve |
/mode without an argument shows the active policy.
Keys
| Key | Action |
|---|---|
enter | send; steer the running turn while one is in flight |
shift+enter / ctrl+j | new line |
esc | cancel the turn, close a panel, or clear input |
ctrl+c | cancel; twice to quit |
ctrl+d | quit when the input is empty |
ctrl+p | command palette |
ctrl+b | session panel |
ctrl+s / alt+a | background tasks sheet |
ctrl+v | attach the clipboard image |
ctrl+o | expand tool output |
ctrl+t | show or hide reasoning |
ctrl+l | clear the screen |
up / down | input history |
PgUp / PgDn, wheel | scroll the transcript |
ctrl+home / ctrl+end | jump to the top / live edge |
| drag | select transcript text; releasing copies it |
Configuration
| Variable | Purpose |
|---|---|
DSH_TUI_RUNTIME | path to a Node-hosted @deepseek-ai/dsh runtime |
DSH_TUI_PYTHON | Python interpreter for python eval cells |
DSH_TUI_TRACE=1 | write timings to <tmp>/dsh-tui/trace.log |
DSH_TUI_FORCE_TTY=1 | bypass the interactive-TTY check |
DSH_TUI_BROWSER_INSTALL=0 | skip downloading Chrome for Testing |
PUPPETEER_EXECUTABLE_PATH | use a specific Chrome/Chromium binary |
Development
AGENTS.md covers the architecture, invariants, and test policy. The short version:
bun install
bun run typecheck
bun run test
bun run build && bun run sync
bun run start
Credits
The interaction design is inspired by oh-my-pi — the bottom-pinned composer, dense status line, and card-style tool output. Background commands and tasks follow Claude Code's model: static tool rows, task notices, and one tasks surface. DSH's rendering, layout, and glyph vocabulary are its own.
Portions of the color math, duration/count formatting, session-accent derivation, and glyph vocabulary are adapted from oh-my-pi, which is MIT licensed.