gxinxing/deepseek-harness-tui

Terminal-native interactive TUI for DeepSeek Harness (dsh) — built with Ink, React for terminals

An interactive terminal chat for DeepSeek Harness built with Ink (React for terminals) — a thin, readable UI plugin of roughly 800 lines rather than a re-implementation of the harness. The transcript is bottom-anchored with no chrome; tool calls fold into compact cells (⠋ Running → ✓ cmd • 1.2s, output dimmed and truncated head+tail); the theme is derived from the terminal's real background via an OSC 11 probe (12% white tint over dark, 4% black over light) and can be forced with DSH_TUI_BG; ctrl+t folds the thinking trace; esc interrupts the running turn through agent.cancel({ kind: 'user' }); Markdown keeps its structure and CJK/emoji wrap at correct character widths. The repository also ships a full inspect → repair → update loop: pnpm check locally, husky + lint-staged on every commit, a CI gate on Node 20/22, and a weekly dependency-update workflow that opens PRs automatically.

Web UI Enhancements ★ 7 updated 2026-08-13 ✅ runtime-tested
View on GitHub ↗

Install

dsh plugin --profile tui add /path/to/deepseek-harness-tui

README install (Node.js ≥ 20 + the DSH CLI): npm install -g @deepseek-ai/dsh, then git clone https://github.com/gxinxing/deepseek-harness-tui, cd deepseek-harness-tui && pnpm install. Wire the bundle into the tui profile once: dsh plugin --profile tui add @deepseek-ai/dsh-headless followed by dsh plugin --profile tui add /path/to/deepseek-harness-tui. Then export TOKENDANCE_API_KEY (or put it in ~/.dsh/.credentials.yaml with mode 0600) and run dsh --profile tui. README also documents a one-time prerequisite patch: TokenDance streams later tool-call deltas with empty name/id, so the stock @deepseek-ai/dsh-llm-deepseek adapter must be guarded in node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js (the edit lives in the global dsh install and is lost on upgrade).

Compatibility

Node.js ≥ 20 and the DeepSeek Harness CLI. Model routing goes through the TokenDance gateway (baseURL https://tokendance.space/gateway/v1, models deepseek-v4-flash default and deepseek-v4-pro), registered in ~/.dsh/settings.yaml under llm-pi-ai.providers.tokendance.

Details

Recent updates

README documents the automated quality gate in detail: local pnpm check (lint → format:check → test, 57 cases) and deps:check/deps:update; pre-commit hooks that run Prettier + ESLint --fix on staged JS; ci.yml whose inspect job matrix runs Node 20 and Node 22 with any stage failure blocking the merge; and deps.yml scanning every Monday 06:00 UTC and opening an auto-update branch + PR when upgrades exist. It also lists good first contributions, including upstreaming the two runtime patches (TokenDance tool-call guard and grep permission-error tolerance).

FAQ

How do I install deepseek-harness-tui?
Install the DSH CLI (npm install -g @deepseek-ai/dsh), clone the repo and pnpm install, then run dsh plugin --profile tui add @deepseek-ai/dsh-headless and dsh plugin --profile tui add /path/to/deepseek-harness-tui. Start it with dsh --profile tui after exporting TOKENDANCE_API_KEY.
Why do tool calls loop with an unknown tool "" error?
TokenDance streams later tool-call deltas with empty name/id and the stock dsh-llm-deepseek adapter overwrites the first call id with an empty string. The README documents a one-time guard applied inside node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js that must be re-applied after every dsh upgrade.
Does it re-implement the harness?
No — the README describes it as a thin plugin (~800 lines of UI). It routes models through the TokenDance gateway via the profile patch and uses the harness's own event bridge for the transcript.

More plugins in Web UI Enhancements

Browse more in Web UI Enhancements

Guides for Web UI Enhancements plugins