Preface

DeepSeek Harness (hereinafter referred to as DSH, with the command-line tool dsh) has a web-based default entry: after installing Node.js, run npx @deepseek-ai/dsh web to open the agent chat in your browser. This workflow is not always suitable for developers who are used to coding in the terminal. If you already have tmux open or a split-editor window, switching to a native Web UI means leaving the command line for session, permission, and model switching. Tools like Claude Code and Codex CLI put coding agents directly in the terminal, with slash commands, session recovery, and approval bars all accessible on the same screen. Many users want a similar workflow for DSH.

The core philosophy of DSH is “everything is a plugin”. The official repository deepseek-ai/deepseek-harness states this clearly: models, tools, skills, sessions, sandboxes, storage, scheduling, and the UI can all be replaced via plugins without modifying the Harness source code. Since the UI is also a plugin, the community can build a terminal UI on top of the official @deepseek-ai/dsh-base instead of rewriting an agent loop from scratch.

That is exactly what dsh-code does. Maintained by UNLINEARITY, it is categorized as a “UI enhancement” in the community plugin directory. This article cross-references the plugin directory page, GitHub repository README, license, troubleshooting documentation, and npm package page to organize what it is, the installation command, how to use it in the terminal, and the permission boundaries you need to be aware of before installation.

First, you need to clarify two points. The main DeepSeek Harness repository mentioned above is still in developer preview, and breaking changes may occur to its APIs. The plugin directory deepseek-harness-plugin.com is a community-run site with no official affiliation to DeepSeek / HoYoverse, and is not an official app store.

What is it

dsh-code is a terminal coding UI plugin for DeepSeek Harness, categorized as “UI enhancement”, maintained by UNLINEARITY, with the repository address UNLINEARITY/dsh-code. It uses the MIT license (Copyright (c) 2026 unlinearity) and is primarily written in TypeScript. The npm package name is also dsh-code, and the published version verified in this article is 0.9.0. The GitHub API currently shows 25 stars for this repository; the star count on the community directory page may be delayed, so refer to the real-time data from the repository.

The directory page positions it as: a DeepSeek Harness terminal experience with slash command completion, used to run agent chats in the command line. The repository README elaborates further: it is bundled as an external add-on on top of the official @deepseek-ai/dsh-base, and uses the same agent, session, tool, command, skill, permission, sandbox, context compression, and plugin services as the DSH Web UI. DSH-Code does not implement a separate agent loop; it only adds a coding-focused TUI on top of the DSH runtime.

In terms of interaction, it draws inspiration from two existing tools: session handling references Codex CLI (session navigation, bounded overlays, history inspection, stable bottom layout), and terminal interaction references Claude Code (slash command discovery, thought folding, approval, questioning, and turn steering). The README also clearly states that this is an independent MIT community project with no affiliation to OpenAI or Anthropic. The familiar interface is just a wrapper, and runtime behavior is still determined by DSH’s services and configuration.

There are other terminal UI plugins in the same category, such as dsh-TUI. These are all community solutions with different installation sources, profile names, and startup commands. Do not confuse their repository names.

Core Features

All the capabilities below come directly from the repository README, not demo examples.

1. No Separate Agent, Only UI Replacement

DSH-Code reads the Harness real-time registry and does not maintain a separate copy of models, tools, or commands locally. Model adapters, tool providers, skill sources, commands, permission policies, persistence backends, sandboxes, and subagent providers can all be added or replaced via DSH’s composable mechanism. The /plugin command provides a read-only view of the current Cordis loader: loader entries, enabled status, module identity, and fiber phase.

The entire process retains only one Ink owner. /new and /resume replace the active agent instead of tearing down and reattaching the terminal. When the agent is busy, switching will wait until the current turn completes naturally; the latest request takes priority, and failed target loads will not corrupt the current session.

2. Select Agent Preset per Session

The host layer shares the registry, persistence, session queries, permissions, and sandbox policies; each session has its own agent scope, which combines tools, prompts, skills, context compression, plan mode, and delegation capabilities via an Agent Preset. The built-in presets listed in the README include:
- standard: a fully functional general-purpose coding agent
- code: a multi-operation workflow for Code Mode / PTC
- minimal: only retains the persistent shell and str_replace_editor
- cordis: full agent, plus runtime checks and preset writing guidance
- User presets: self-defined tools, prompt paragraphs, skills, context compression, plan mode, and subagent behavior

You can use /mode to view or select a preset before the first turn; you can also add the --mode flag at startup. The selected preset will be written to the session and restored when resuming.

3. Slash Commands, Models, and Credentials

Slash commands and user skills are discovered in real time from the shared Harness registry, not hardcoded into the TUI. Common operations after entering the interface include:

Operation Purpose
/new [preset] Create and enter another session without restarting the terminal
/resume [id\|prefix] Search root sessions or all conversations, filterable by cwd, sort order, and density
/mode [preset] Check or select an agent combination for an empty session
/model Switch between models provided by the real-time LLM registry; press a to manage providers and API keys
/plugin [query] Check loader entries, enabled status, module identity, and fiber phase
/permission Switch permission presets; press Shift+Tab to cycle through options
/help Browse local commands, Harness commands, skills, and keyboard shortcuts
Ctrl+O Open an exclusive history detail view
Ctrl+R Fold or unfold the model’s thought process
@ Reference workspace files or bounded snapshots of persistent sessions
Esc / Ctrl+C Close the topmost interface or interrupt the current turn

The provider panel in /model only reads the configured status, source, and writability of credentials; input content is masked and directly handed over to Harness for persistence. Keys provided by the startup environment will be marked as read-only and cannot be overwritten or removed in the TUI. DEEPSEEK_API_KEY is not a pre-requisite for startup: you can enter the TUI, view sessions, and use non-model-dependent features without a configured key, then add credentials by pressing a in /model later.

4. Session Recovery and Context

Prompts, streaming chunks, tool calls and results, model selection, plan status, permissions, titles, and preset selections are all projected from persistent session events. Session recovery, export, history inspection, context statistics, and terminal replay all use the same record. React state only saves temporary UI states such as input drafts, cursor position, current panel, selected items, and scroll position.

Session-related capabilities also include: bare startup will delay session creation until the first real input, and exiting without entering any input will not leave an empty session; global input history can be recalled across sessions with Up/Down arrows, and the /history search panel can populate the input box; subagent conversations can be viewed in read-only mode, and bounded session references can be injected via @. The interface displays context usage, cache, tokens, TTFT, and latency metrics, and supports Markdown export.

5. Approval, Questioning, and Terminal Layout

Sandbox upgrades and ask decisions from hooks go through a one-time tool approval bar. Structured ask_user_question and plan review menus support multi-select and custom answers. Turn steering occurs at the next step boundary, with clear interrupt semantics. Agent mode, plan, permission preset, goal, and sandbox status are independent of each other, and switching one switch will not accidentally alter the others.

For rendering, finalized history is only appended, and streaming variable areas have viewport constraints. Thought processes can be folded, and tool calls have compact summaries and full structured details. In the two-line status bar, mode and context appear on the second line, with context represented by a blue progress bar. The input box always sticks just above the status bar; the fixed bottom order is: content or panel → notice → input box → status bar. The welcome header displays the installed version and the bilingual slogan written in the repository: “Into the Unknown 探索未至之境”.

Additionally, when switching to a DeepSeek route or changing reasoning effort under the same route, the input box will randomly play one of three local animations: Wave, Aurora, or Pulse. The flash level and number of waves differ from other DeepSeek models. This is only UI decoration and does not change agent behavior.

Installation and Activation

The installation command given on the directory page is as follows. Run it in the DeepSeek Harness terminal, and the dsh CLI will parse the plugin from GitHub and install it to the current configuration:

dsh plugin add github:UNLINEARITY/dsh-code

For reproducible installations, the directory page requires pinning a commit hash:

dsh plugin add github:UNLINEARITY/dsh-code#commit

Replace #commit with the actual commit hash. The plugin runs with the permissions of the current dsh process, and may execute code during installation. Please check the source repository and license before installing.

The command above is the official installation entry on the directory page. To set up a launchable terminal interface according to the repository README, you also need Node ^22.19 || >=24, the preview version of the dsh CLI, and pnpm. The recommended installation steps from the current README are:

npm install -g @deepseek-ai/dsh dsh-code
npm install -g pnpm
dsh plugin --profile cli add dsh-code@0.9.0

dsh-code@0.9.0 is the version specified in the README when this article was verified. The prompt notes that pnpm will ignore packages published less than 24 hours prior; on the first day of release, you need to use the exact version number; after 24 hours, you can omit the version and write dsh plugin --profile cli add dsh-code. npm installations are not subject to this restriction. For users who only use the plugin and do not participate in source development, the README and troubleshooting documentation strongly recommend the npm published package, as it already includes the lib/ build artifacts.

After installation, the following three startup commands are equivalent:

deepseek
dsh --profile cli
dsh-code

deepseek and dsh-code are both global aliases for dsh --profile cli, and subsequent parameters will be forwarded intact, for example deepseek --resume abc123.

For installation from GitHub source code (for development), the README specifies:

dsh plugin --profile cli add github:unlinearity/dsh-code

Git packages will be built during the installation phase. If pnpm requires adding allowBuilds, copy the complete output entry to ~/.dsh/profiles/cli/pnpm-workspace.yaml, then re-run the command. This key includes the Git URL and commit, and cannot be simplified to just dsh-code: true. For a local checkout, use dsh plugin --profile cli add file:C:/path/to/dsh-code, replacing the path with your local directory.

Uninstallation requires two steps; executing both commands completes a full removal:

dsh plugin --profile cli remove dsh-code
npm uninstall -g dsh-code

The first command only unmounts the plugin from the cli profile, at which point the deepseek command may still exist and prompt the cli profile does not mount dsh-code yet; the second command removes the global npm package and startup aliases. Uninstallation does not affect the main @deepseek-ai/dsh package, and will not delete already persisted session data.

Typical Usage

The commands and operations below come from the repository README and can be reproduced as-is.

First start a session with the cli profile. The default is the standard preset:

dsh --profile cli

To use the preset optimized for coding workflows, add the --mode flag:

dsh --profile cli --mode code

Resume the most recent session in the current directory, resume by session id (or unique prefix), or specify a new session id:

dsh --profile cli --continue
dsh --profile cli --resume abc123
dsh --profile cli --session my-id

A common workflow after entering the TUI is:
1. Execute /mode before sending the first message to confirm the current Agent Preset.
2. Execute /model and press a to add providers and API keys if needed.
3. Use /help to view local commands, Harness commands, skills, and keyboard shortcuts.
4. Reference workspace files with @ during coding; use Ctrl+O to review history when needed.
5. Use Ctrl+R to fold long model thoughts; use the on-screen approval bar when tool calls require confirmation.
6. Open a new session with /new, and retrieve old sessions with /resume, without exiting the terminal.

You can check if the plugin is mounted with the following command. The troubleshooting documentation requires that dsh-code/startup appears in the output:

dsh --profile cli --dump-config

Applicable Scenarios and Notes

It is suitable for users who are already using DSH and want to keep coding agents in the terminal: they need slash commands, session recovery, permission switching, model management, and tool approval, but do not want to leave the command line to open a Web UI. It relies on the agent, session, and tool services from the official dsh-base, so other plugins in the DSH ecosystem (skills, model adapters, sandbox policies) can still be added via Harness’s composable mechanism. Do not treat DSH-Code as “another independent agent product” — the README repeatedly emphasizes that it has no own agent loop.

There are several important points to note before use.
1. Permissions and License. The plugin runs with the permissions of the current dsh process, and may execute code during installation. You should check the source code repository and the MIT license before installing. This warning is also posted on the directory page.
2. Preview APIs. DeepSeek Harness is still in developer preview, and breaking changes may occur; DSH-Code will follow plugin interface evolution, but does not guarantee that older versions of the UI will still work after a dsh upgrade.
3. Runtime Dependencies. Requires Node ^22.19 || >=24, and pnpm on the PATH. If pnpm is missing, startup will prompt dsh: pnpm not found on PATH — install pnpm to manage profile plugins.
4. pty.node on Linux. Troubleshooting documentation notes: DSH’s local subprocess plugin relies on node-pty, which may fail to find pre-built pty.node on some Linux x64 / Node 24 environments. You need to first install build-essential, Python, and make, then enter the node-pty directory in the global DSH installation and run npx node-gyp rebuild. This issue is consistent with upstream DeepSeek Harness discussions, not a problem introduced by DSH-Code alone, but it is more likely to be encountered when using the terminal interface.
5. GitHub Source Installation. When using github:unlinearity/dsh-code, pnpm may block the prepare build step. Using the published package is more convenient; if you must use the repository source code, authorize the complete allowBuilds key output by pnpm, do not simplify it to just the package name.
6. Do not paste credentials into chat. Keys in environment variables are read-only in the TUI; new keys added in /model will be handed over to Harness for persistence, with input masked. Never paste private keys into chat logs.

Summary

dsh-code moves DeepSeek Harness’s coding agents from the browser back to the terminal: slash commands, session recovery, Agent Presets, model and credential management, approval, and thought folding are all completed in the same TUI, while still using the official dsh-base agent, session, and tool services under the hood. It is an MIT-licensed community plugin maintained by UNLINEARITY, not an official DeepSeek interface, and has no product affiliation with Claude Code or Codex CLI.

Plugin Directory: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-code/

GitHub: https://github.com/UNLINEARITY/dsh-code