harness-code
v0.6.0
Published
A terminal-first coding agent powered by the official DeepSeek Harness runtime.
Downloads
46
Maintainers
Readme
Harness Code
Harness Code is a terminal-first coding agent built on the official DeepSeek Harness runtime. It is not an Electron wrapper and does not launch a browser or HTTP server: the terminal client and Harness agent communicate through the Agent Client Protocol over local process stdio.
Status: functional community preview. Harness Code is an independent community project, not an official DeepSeek product.
Quick start
Requires Node.js 22.19 or newer. Install the public npm package once, then start it from any project directory:
npm install --global harness-code
deepseekThe first launch opens a terminal-native connection wizard. Paste a DeepSeek API Key, validate it against the official API, choose a model, and start working. There is no localhost address, browser tab, Electron shell, or background Web server.
Upgrade or uninstall with the normal npm workflow:
npm update --global harness-code
npm uninstall --global harness-codeWhy this project
The official Harness already provides a capable agent loop, session log, DeepSeek adapter, filesystem and shell tools, sandbox policy, compaction, skills, goals, and subagent primitives. Its shipped headless entry is intentionally one-shot, while its Web client owns the interactive experience. Harness Code adds the missing terminal host without reimplementing that runtime.
Development from source
git clone https://github.com/withlovehub/harness-code.git
cd harness-code
npm install
npm run build
npm linkEnter a project and run the agent:
cd C:\path\to\project
deepseekOn first launch, Harness Code opens a terminal setup screen. Paste the API Key from the DeepSeek Platform, let the client validate it against the official API, and choose DeepSeek V4 Pro or V4 Flash. No environment-variable command is required.
Connection management is also available without entering the agent:
deepseek auth login
deepseek auth status
deepseek auth logoutOn Windows, the saved credential is encrypted for the current Windows account with DPAPI. The key is never echoed or written to shell history. DEEPSEEK_API_KEY and DEEPSEEK_MODEL remain supported as temporary overrides for CI and automation.
One-shot and diagnostic modes:
deepseek -p "explain this repository"
deepseek --mode plan
deepseek --mode yolo -p "run the full test suite and fix failures"
deepseek doctorhcode remains available as a compatibility alias for every command above.
Modes
| Mode | Harness policy | Behavior |
|---|---|---|
| plan | read-only | Investigate without mutations and reject escalation requests. |
| agent | workspace-write | Allow workspace edits and ask before broader effects. |
| yolo | danger-full-access | Auto-approve effects; intended for disposable environments. |
Terminal interface
The interactive client uses a full-screen, DeepSeek-inspired TUI with a pixel-whale hero, responsive workspace header, live turn status and elapsed time, a minimal composer, permission dialogs, and an incremental slash-command palette. During a turn, a dedicated Thinking card shows a safe task summary, execution stage, tool count, elapsed time, and provider-reported token usage. It does not expose or fabricate private chain-of-thought. Type / to open the command center, use the arrow keys to select an action, press Tab to complete it, and press Enter to run it.
Interactive commands
Type / to open the scrollable command center, then use the arrow keys and Tab to select a command. Start typing a command name to filter all built-ins and dynamically discovered skills.
- Session:
/clear,/cls,/compact,/context,/copy,/export,/usage,/status. - Connection, model and safety:
/connect,/model(/models),/effort,/mode,/permissions,/plan. - Workspace:
/skills,/reload-skills,/pwd,/diff,/init,/memory. - Agent workflows:
/review,/security-review,/test,/simplify,/explain,/fix. - Diagnostics:
/doctor,/config,/help,/exit.
/copy, /export, /diff, /doctor, /context, and /usage execute locally without spending model tokens. Workflow commands enter the real Harness agent loop and use its tools and approval policy.
Esccancels the current turn.Shift+Tabcycles permission modes,Alt+Pcycles models,Alt+Ecycles reasoning effort, andCtrl+Dexits while idle.
Architecture
hcode terminal client
│ ACP JSON-RPC over stdin/stdout
▼
official dsh-acp-demo runtime
│
├─ DeepSeek model adapter
├─ persistent agent/session loop
├─ filesystem + shell tools
├─ sandbox + human approval
└─ compaction + workspace instructionsEverything above runs as local child processes connected through standard input and output. The only required network request during normal use is from the model adapter to the official DeepSeek API.
Session logs, settings and credentials are stored outside the workspace under the platform state directory (%LOCALAPPDATA%\HarnessCode on Windows, $XDG_STATE_HOME/harness-code or ~/.local/state/harness-code elsewhere). Override it with HCODE_DATA_DIR.
Current limitations
- The upstream ACP server currently emits committed assistant messages rather than token-level reasoning and tool progress.
- ACP currently creates fresh sessions only, so
/clearworks within one process but cross-process resume is not exposed yet. - Windows credentials use current-user DPAPI encryption. Other platforms currently use a local file restricted to the current OS user.
- Mode and model changes restart the embedded local runtime, so they take a few seconds while preserving the visible transcript.
These are transport limitations, not reasons to fork the agent loop. The intended next step is to contribute richer session loading and progress events to the upstream ACP adapter, then consume them here.
License
MIT. See NOTICE for upstream attribution and trademark clarification.
