dsh-cli
Terminal client for DeepSeek Harness. It uses Harness's own base profile for model access, tools, sessions, permissions, and /goal. This project only owns the terminal interaction.
Install
Node.js 22.19+ or 24+ is required on macOS or Linux:
npm install -g @k0ngk0ng/dsh-cli
To run from this checkout:
npm install
npm run build
node dist/bin.js
Set DEEPSEEK_API_KEY in your environment or a .env file in the working directory, or use credentials already stored by DeepSeek Harness under $DSH_HOME (default ~/.dsh). If Harness already has your key, dsh uses it without asking again. The current directory becomes the workspace and is trusted immediately. The default permission mode allows writes inside it and asks before actions that need more access.
dsh
dsh --yolo
dsh exec 'explain this project'
dsh resume
dsh resume session-<id>
--yolo selects Harness's danger-full-access sandbox mode and never approval policy. Use it only when that access is intended. Ordinary interactive sessions answer individual approval requests with y or n.
In the terminal, /goal <objective> creates a persistent goal and lets Harness continue it through its own goal driver. /goal, /goal edit <objective>, /goal pause, /goal resume, and /goal clear use the native Harness command. Answers render as Markdown, including tables, lists, links, and code blocks, and remain fully available in the scrollable conversation. Enter sends, Alt+Enter inserts a line, Page Up/Down scrolls, and Ctrl+O opens recent tool details. Ctrl+C cancels the active run or exits from an idle prompt. /exit also closes the session.
Configuration
No config file is needed. An optional .dsh.json in the working directory can select the model and endpoint:
{
"model": { "provider": "deepseek-official", "id": "deepseek-flash" },
"baseUrl": "https://api.deepseek.com"
}
--model, --provider, and --base-url override those fields. The provider field is kept in the format for later adapters; this release accepts deepseek-official only. Harness stores profiles and sessions in $DSH_HOME (default ~/.dsh). The terminal profile is terminal, and its Harness cordis.patch.yml remains available for advanced customization.
Completion
dsh completion bash
dsh completion zsh
Source the output from your shell configuration or save it to a completion directory. Completion is generated without starting Harness.
Design
The CLI boots DeepSeek Harness in the same process, then uses its Agent, Command, Approval, and Session services. The build bundles Harness's profile launcher into this package so its own dsh command does not conflict with the upstream launcher. src/runtime.ts exposes a small SessionRuntime boundary so a remote transport can be added later without changing terminal input and rendering. Runtime startup applies only a two-row patch: no hot reload in terminal mode and no extra model call to title each session.
Publishing
Push a version tag such as v0.1.0 to run .github/workflows/publish-npm.yml. The workflow tests on macOS and Linux, checks that the tag equals the version in package.json, and publishes @k0ngk0ng/dsh-cli to npm with provenance. Configure the repository secret NPM_TOKEN with publish access to the @k0ngk0ng scope before pushing the tag. Ordinary branch pushes do not publish.