deepseek-harness reference
Reference tables for deepseek-harness (dsh) CLI commands, environment variables, wire protocol behavior, build targets, and exit codes.
CLI commands and flags
| Command | Flags and arguments | Description |
|---|---|---|
| dsh --version | none | Print the installed dsh version string (for example 0.2.1-alpha.1 for a source build of main). |
| dsh --profile headless | "<prompt>" | Run a single non-interactive prompt and print the plain-text answer to stdout. |
| dsh web | [--no-open] | Start the Web UI server at http://127.0.0.1:3080 (opens browser unless --no-open or SSH). |
| pnpm run build | none | Compile all workspace packages and prepare repository artifacts from source. |
| pnpm run dev:web | none | Build, serve, and rebuild client bundles on source edits. |
Environment variables
| Variable | Default | Purpose |
|---|---|---|
| DSH_HOME | ~/.dsh | Directory for dsh state, configuration, and local session data. |
| DEEPSEEK_API_KEY | unset | API key for authenticating model requests. |
| DEEPSEEK_BASE_URL | vendor default | Trusted environment-tier API base URL override (such as http://127.0.0.1:PORT/v1). |
| DSH_TELEMETRY_DISABLED | unset | Set to 1 to disable telemetry in automated tests and hermetic environments. |
Wire protocol and provider-mock-e2e profile
| Property | Value | Notes |
|---|---|---|
| Package name | @deepseek-ai/dsh (binary: dsh) | Built from lmctl-ai/deepseek-harness on arm64. |
| HTTP route | POST /v1/messages (Anthropic Messages SSE) | Observed with the default headless configuration in lmctl provider mock runs. |
| Headless args | dsh --profile headless "<prompt>" | Stdout trimmed is the exact model reply. |
Exit codes
| Code | Meaning |
|---|---|
| 0 | Headless prompt, version check, or server shutdown succeeded. |
| non-zero | Missing credentials, HTTP transport failure, or plugin initialization error. |