Back to home@yaotongsb

dsh-phosphor

A full-screen, Matrix-styled TUI frontend for DeepSeek Harness — built with React + Ink as a Cordis bundle plugin

Stars
0
Language
TypeScript
Created
Aug 29, 2026
Updated
Aug 29, 2026
GitHub repo

Introduction

dsh-phosphor

A full-screen, Matrix-styled TUI frontend for DeepSeek Harness — built with React + Ink as a Cordis bundle plugin.

中文文档

█▓▒ PHOSPHOR ▒▓█

matrix theme terminal theme

Status: source-only distribution (for now)

dsh is in developer preview and explicitly warns about breaking changes. This plugin is tightly coupled to the host's internal plugin APIs — a host upgrade can break it silently (we have been bitten by exactly this). Shipping an npm package or tarball today would fake stability: no update channel, no version guard, and a broken TUI after the next host rc.

So, until dsh ships a stable release:

  • Source only. You clone, build, and link against your own dsh checkout — which forces you to know exactly which host revision you are running.
  • Pinned baseline: dsh v0.1.1-rc.2 (commit b150a551b8). Other revisions may work, but are untested.
  • dsh plugin add github:... is NOT supported. pnpm runs prepare inside its own cache directory, where this repo's link: devDependencies cannot resolve. Use the source flow below.
  • Once dsh stabilizes, we will realign the code and publish to npm properly.

Requirements

  • Node.js ^22.19 || >=24, pnpm
  • A deepseek-harness source checkout, built (pnpm install && pnpm run build)
  • Developed against Windows Terminal; other terminals are untested (see Known limitations)

Install from source

The plugin resolves its @deepseek-ai/* dev dependencies through relative links, so the two repositories must sit in the same parent directory:

<workspace>/
├── deepseek-harness/     # dsh source checkout (pinned baseline)
└── dsh-phosphor/         # this repo
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness && git checkout b150a551b8 && pnpm install && pnpm run build && cd ..

git clone https://github.com/yaotongsb/dsh-phosphor.git
cd dsh-phosphor && pnpm install && pnpm build

# One-time registration into a profile (run from the dsh checkout,
# so the relative path resolves):
cd ../deepseek-harness
pnpm dsh plugin --profile tui add ../dsh-phosphor

Run

dsh treats the launch directory as the workspace root — start it from whatever project you want to work on. pnpm dsh only exists inside the dsh checkout; for daily use, launch the built CLI directly from any directory:

cd your-project
node /path/to/deepseek-harness/apps/cli/lib/bin.js --profile tui

An alias saves the typing:

# ~/.bashrc
alias dsh-tui='node /path/to/deepseek-harness/apps/cli/lib/bin.js --profile tui'

Rebuild after any plugin change (pnpm build in dsh-phosphor) — the profile links to the directory, so the next launch picks up the new lib/.

Commands

Phosphor's own commands:

CommandDescription
/helpCommand help
/modelModel picker — type to filter, Shift+Tab cycles reasoning effort
/newNew session (Ctrl+N)
/resumeSession picker — type to filter, a archives the highlighted session
/attach <path>Attach an image to the next message (requires a vision model; png/jpeg/webp/gif)
/detachClear pending attachments
/pluginsHost plugin inventory (loader reflection: state, fiber phase, config)
/settingsRuntime settings panel (permission presets + visuals)
/theme matrix|terminalSwitch theme
/exit, /quitQuit

Provided by the host (dsh-base), routed through phosphor's UI:

CommandDescription
/compactCompact conversation history
/planPlan mode (full-screen review overlay)
/goalTrack a session goal
/permissionPermission settings
/feedbackSend feedback

Key bindings

Global:

KeyAction
Ctrl+CQuit
Ctrl+LFull-screen repaint (clears any ghost frames)
PgUp / PgDnScroll transcript back/forward

Editor:

KeyAction
Tab / / Navigate slash-command hints
@File-reference completion (fuzzy, cwd-rooted)
Home EndCursor movement (multiline-aware)
Ctrl+UClear current line
EscCancel / close overlay

With an empty input buffer:

KeyAction
Alt+T / Alt+J / Alt+FOpen side panel: TRACE / JOBS / FILES
Alt+OCollapse/expand the side panel
Alt+1..9Jump to a recent session
Ctrl+NNew session
xKill the selected job (JOBS panel, / to select)

Overlays:

ContextKeys
Plan review↑↓ / PgUp/PgDn scroll · y approve · n keep planning · o feedback · Esc exit to talk
Approval bary approve · n reject
Resume pickertype to filter · a archive · Enter open

Configuration

All options are validated by a Schemastery schema and set through cordis.yml layers — e.g. your profile's ~/.dsh/profiles/tui/cordis.patch.yml:

- id: phosphor
  config:
    theme: matrix
    matrixRainFps: 8
KeyTypeDefaultDescription
themematrix | terminalmatrixColor scheme
matrixRainbooleantrueDigital-rain background layer
matrixRainFps2–248Rain frame rate cap (auto-throttles under load)
scanlinesbooleanfalseCRT scanline overlay
panelWidth16–4826Side panel width in columns
panelModetrace | jobs | filestracePanel shown at startup
showReasoningbooleanfalseExpand reasoning blocks by default
showInjectedbooleanfalseRender injected context (AGENTS.md, hooks) in full
verboseStatusbooleanfalseVerbose status-bar counters

Runtime toggles for the visual options live under /settings; the config file sets the persistent defaults.

Themes

  • matrix — black + three-tone neon green, digital rain, breathing status dot, optional scanlines. The rain renders only through empty cells and halves its frame rate under load.
  • terminal — your terminal's 16-color palette; every animation degrades to static.

Known limitations

  • Version-locked to dsh v0.1.1-rc.2; host upgrades may break things until the declared stable release.
  • Images are never rendered in the terminal — a dim placeholder line (▣ name (W×H)) marks attachments.
  • No persistent plan-mode badge (the mode itself works; only the indicator is missing).
  • Resuming very long sessions is slow (host-side log replay), and the rain frame rate adapts to system load on purpose.
  • No un-archive in V1; archiving shares web UI state (~/.dsh/storages), and concurrent dsh processes are last-writer-wins.
  • Developed and tested on Windows Terminal only.

Development

pnpm install     # requires the sibling deepseek-harness checkout
pnpm test        # vitest, 426 tests
pnpm typecheck   # tsc --noEmit
pnpm build       # tsdown → lib/

The development loop runs from the dsh checkout: pnpm dsh --profile tui.

The codebase is compact and layered (bridge/store/ui/, with pure-function transcript projection in between); start from src/index.ts and the tests sitting next to each module. Contributions welcome.

License & credits

MIT © yaotongsb

The markdown renderer (src/ui/markdown.ts: block structure, table column-width algorithm, streaming fence trim, inline base-style restore) is ported from PI (packages/tui/src/components/markdown.ts) — MIT License, Copyright (c) 2025 Mario Zechner.