DeepSeek Code (dscode)
Terminal coding agent UI powered by DeepSeek Harness. The product bundles a
Rust TUI, an isolated dsh profile, and the bridge between them.
Personal project — not affiliated with or endorsed by DeepSeek or xAI.

Prerequisites
- macOS Apple Silicon or Linux x86-64
- Node.js
>=22.19.0and npm (the floor comes from pinneddsh) - GitHub network access for the first install
~/.local/binonPATHafter installation
You do not need to install dsh globally. The launcher reuses an exactly
compatible dsh from PATH or installs its own pinned runtime.
Install
npx @hqzhao95/dscode
The first run creates ~/.dsh/profiles/dscode, installs the bridge and tested
runtime, downloads the matching TUI binary with checksum verification, and
links ~/.local/bin/dscode. It does not change the global npm prefix.
It never installs or switches Node for you.
The dsh runtime install and compressed TUI download run in parallel.
A fresh profile has no provider or API key. Open /provider --add and choose
a template or Custom; dscode does not restrict which provider you use.
Use
dscode # interactive TUI
dscode "review this repository" # start with a prompt
dscode -p "explain src/index.ts" # headless single turn
dscode -c # continue the latest session for this cwd
dscode --resume <id-or-title> # resume a session
dscode sessions list # list durable sessions
dscode -w # new session in an auto-named worktree
dscode --worktree=feat "fix it" # named worktree with an initial prompt
dscode --resume <id> --worktree=try # fork a conversation into a worktree
dscode worktree list # inspect managed worktrees
--worktree-ref <branch|tag|commit> selects the clean base. Management stays
local: dscode worktree list|show|rm|gc|db; rm uses the upstream
no-data-loss gate unless --force is explicit.
Headless output formats are plain, json, streaming-json, and
streaming-messages-json.
Useful in-app commands:
/model— choose model and reasoning effort; choices persist/providerand/provider --add— select or add any provider/presetorCtrl+Y— choose any discovered preset; four ship by default/dsh plugins— inspect profile pluginsCtrl+Won the welcome screen — create a managed isolated Git worktreeCtrl+S— open durable session resume
Run dscode --help for the complete CLI.
When switching providers, dscode keeps the current model if the target
provider exposes the same model id; otherwise it selects that provider's first
model. Reasoning effort is remembered separately for each provider/model pair.
Update
dscode update --check # check only
dscode update # remembered/current channel
dscode update --stable # stable channel
dscode update --beta # beta channel
dscode update --version <version> # exact version
Update keeps the npm bridge, tested dsh runtime, and TUI binary on the same
release channel. Explicit --stable and --beta selections are remembered.
Uninstall
dscode uninstall
This removes the dscode profile, product-owned runtime and TUI cache, and the
owned launcher link. Shared ~/.dsh/sessions and ~/.dsh/storages remain.
If the launcher is unavailable, remove only the owned paths manually:
rm -rf ~/.dsh/profiles/dscode ~/.local/bin/dscode