返回目录

dsh-code

维护状态: 活跃

guoxiucai/dsh-code

基于 DeepSeek Harness 的终端式(pi-tui)代码智能体,在命令行里直接完成编码任务。

前往 GitHub
$ dsh plugin add dsh-code

安装

dsh 没有统一的安装命令——把该插件 README 中的配置行加入你的 profile/patch 配置,然后重启即可。

了解安装方式

8

星标

4

Fork

TypeScript

语言

MIT

许可证

2026-08-16

创建于

2026-11-20

最近推送

README

dsh-code terminal whale logo

dsh-code

A DeepSeek Harness terminal coding agent for developers who prefer a focused TUI workflow.

English · 简体中文

CI MIT License Node.js 24.9+ Powered by dsh

[!IMPORTANT] dsh-code is an independent community project, not an official DeepSeek distribution. DeepSeek Harness is also in developer preview, so compatibility-breaking upstream changes may occur between pinned baselines.

Why dsh-code?

DeepSeek Harness provides an official Web UI and a plugin-first agent runtime. dsh-code is for developers who prefer to stay in the terminal: it packages the same DSH agent semantics in a compact, keyboard-driven interface that works naturally beside shells, editors, Git, and remote development environments.

The product draws on the interaction ideas of Pi and uses @earendil-works/pi-tui for terminal rendering. It does not fork or replace the agent core. The Agent Loop, sessions, model adapters, tools, sandbox, permissions, MCP, Skills, Plan/Todo, and sub-agents remain owned by the pinned DSH runtime.

In short:

DeepSeek Harness agent runtime + Pi-inspired terminal UX + pi-tui renderer

Requirements

Component Supported platforms (0.1.6+)
macOS 14 or later, Apple Silicon (arm64)
Windows Windows 10 or later, x64
Linux x64, validated on Ubuntu 22.04; Ubuntu 24.04 installation CI
Node.js 24.9+
Package manager npm for normal installation

Linux x64 joins macOS and Windows in 0.1.6. Physical Ubuntu validation is recorded in the Linux validation report. Linux clipboard support requires wl-copy/wl-paste (Wayland), or xclip/xsel (X11); /web needs a desktop browser for automatic opening.

Linux ARM64/Alpine (musl), macOS Intel/Rosetta, Windows ARM, and standalone installations without Node.js are not supported. Other Linux distributions have not been validated.

Installation

npm

npm install -g @tsingwill/dsh-code

Install the current release candidate instead of the stable channel:

npm install -g @tsingwill/dsh-code@next

Verify the installation:

dsh-code --version
dsh-code --help

The scoped npm package is @tsingwill/dsh-code; the installed command remains the shorter dsh-code.

Build from source

git clone --recurse-submodules https://github.com/guoxiucai/dsh-code.git
cd dsh-code
corepack enable
npm install --global pnpm@11.28.5
pnpm install --frozen-lockfile
pnpm run build:lib
pnpm run build
node lib/bin.js

Preview

dsh-code welcome screen and command autocomplete

Highlights

  • Terminal-native workflow — streaming Markdown, five-line collapsed reasoning and verbose tool bodies, always-visible line-numbered file diffs, selectable/copyable results, themed paste markers, shell blocks, and a bottom-pinned composer.
  • Standard and PTC modes — Standard makes direct tool calls; PTC composes multi-step work in one TypeScript program. PTC child calls use native tool rows, with long bodies collapsed and file diffs always visible.
  • DeepSeek Harness semantics — uses DSH's public session/events and services; there is no second agent loop, session store, permission engine, or tool registry.
  • Model setup in the TUI — configure DeepSeek, OpenAI, or an OpenAI-compatible endpoint through an inline, reversible wizard.
  • Safe project startup — canonical-path trust records and read-only, workspace-write, or danger-full-access permission presets.
  • Persistent sessions — start, resume, search, delete, fork from a historical request, clone the current snapshot, inspect statistics, and compact context.
  • Agent visibility and decisions — dedicated Plan/Todo states, queued-user message feedback, tool progress, retry and compaction indicators, one-shot approval bars, structured questions, plan review, and a clickable active sub-agent indicator with cancel/remove controls.
  • Fast terminal controls — slash-command completion, fuzzy @ file and folder completion, direct ! shell mode, inline selectors, and keyboard-first navigation.
  • Independent installation — stores product data under ~/.dsh-code, keeps a separately installed dsh command untouched, and supports explicit updates.
  • Adaptive visuals — a DeepSeek-blue palette tuned independently for dark and light terminal backgrounds.

Architecture

dsh-code is deliberately a thin terminal host over a fixed DSH baseline:

flowchart TB
  User["Terminal user"] --> CLI["dsh-code launcher"]
  CLI --> TUI["Terminal host<br/>Pi-inspired UX + pi-tui"]
  TUI --> API["Public DSH services<br/>session/event + AgentHandle"]
  API --> DSH["@deepseek-ai/dsh-base<br/>Standard / PTC Agent Preset"]
  DSH --> Runtime["Agent Loop · Sessions · Models · Tools<br/>Sandbox · Permissions · MCP · Skills<br/>Plan/Todo · Sub-agents"]

在 GitHub 阅读完整 README →

DSH Plugins 是独立的 DeepSeek Harness 插件目录,与 DeepSeek 官方无关,也不代表官方背书。第三方插件未经安全审计,安装前请审查源码。

每周获取最新的 DeepSeek Harness 插件,绝不滥发。