Tianshu Harness CLI
A coding agent for the terminal and desktop: it does not count "done" without tests or a diff and works with DeepSeek, GLM, Kimi, Claude, Codex and Gemini
- 1,145 ★ on the repository
- Last commit
- Apache-2.0
Broad access
Why this level
- The agent runs shell commands, edits and rolls back project files and calls the chosen model providers over the network; in `/yolo` mode confirmations are off
- Provider keys are stored on the machine, and the Codex sign-in goes through a ChatGPT account
- Remote approval from a phone or tablet is switched on separately: the agent session becomes reachable from another device
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/tianshu-harnessDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent runs shell commands, edits and rolls back project files and calls the chosen model providers over the network; in `/yolo` mode confirmations are off
- Provider keys are stored on the machine, and the Codex sign-in goes through a ChatGPT account
- Remote approval from a phone or tablet is switched on separately: the agent session becomes reachable from another device
This is third-party code. Review the repository files before installing.
What it does
Tianshu Harness is a TypeScript coding agent with a terminal interface and a desktop app on one core. The CLI installs from npm with `npm install -g tianshu-harness` (Node.js 24 or newer) and starts with `tianshu`; the older name `rivet` stays as an alias. On first run it opens the `/connect` wizard, where you pick a provider and paste an API key. After that the agent reads the project, searches the code, edits files, runs tests and uses language servers: go to definition and find references are tools for it, and type errors after an edit land in the model's context at once. The core idea is the CVM layer, a cognitive virtual machine. The goal, state, evidence, resources and stop conditions live there, apart from the conversation history. The goal is pinned by a task contract, and at the end the agent calls `deliver_task` and produces a report: delivery status (GREEN, YELLOW or RED), changed files, the checks it ran and an item-by-item audit against the task. Completion without evidence is not accepted. 75 runtime hooks intercept typical model failures, such as giving in under pushback or losing the goal, and a separate detector watches for loops. Larger tasks get multi-agent modes: `/scout` for read-only reconnaissance, `/team` for parallel work, `/council` for discussion by several roles and `/galaxy` for hard problems that need several viewpoints at once. The `/domain` command switches one of 16 star domains, which are behavior presets: one weighs benefits against cost first, another counts work as done only once the original problem no longer reproduces. For scripts there are `tianshu -p "task"` for a single prompt, `--stream-json` for an NDJSON event stream and `--goal "goal" --budget 50` for an autonomous headless run.
Who it is for. For developers who want a terminal or desktop coding agent that checks its own results and lets them choose among DeepSeek, GLM, Kimi, Claude, Codex and Gemini models or any OpenAI-compatible endpoint.
Good fit when
- The task is large and agents usually lose the goal halfway: the task contract and the delivery check demand evidence before accepting "done"
- You want one agent across several providers: DeepSeek, GLM, Kimi, MiniMax, Grok and Gemini by key, Claude by key through the `cc-switch` proxy, Codex through a ChatGPT sign-in, plus Ollama or vLLM
- The agent is called from a script or CI: `tianshu --stream-json -p "task"` emits NDJSON events, and `--goal` drives a goal without the interface
- Reading and editing should be separate: `/scout` only investigates the code, `/team` splits work among workers in waves with a check after each
- You want to approve risky actions from a phone or tablet: the desktop app supports remote approval
Not a fit when
- The machine runs Node.js below 24 and cannot be upgraded: that is a hard requirement for the CLI
- You use Linux with Wayland or glibc older than 2.35: the AppImage targets glibc 2.35 and newer, and the author has not tested Wayland yet
- You need guides in Russian: the main documents on commands, providers and permissions are written in Chinese, and only the README and a few pages exist in English
- You want a plugin inside Claude Code or Codex: Tianshu Harness is a standalone agent with its own runtime and does not install on top of another one
Example request
Read the project, find the first failing test, fix it and show me the delivery report with the verification commandsLimitations
- The code is Apache-2.0, but two documents on the CVM theory and its trials are released under CC BY-NC-ND 4.0: they may be quoted with a link but not adapted or used commercially.
- The headline claims were tested by the author. The CVM trial is two groups of five tasks on one model, DeepSeek-V4-Flash, without and with the belief prompt, graded by Claude Opus 4.7; the 95–99% prefix-cache hit rate was also measured on the author's own sessions. There is no independent replication, and the effect of the belief prompt fades during execution, as the author notes.
- Claude connects only by API key through the `cc-switch` proxy, and Codex models through a ChatGPT sign-in over OAuth.
- The macOS build is ad-hoc signed without Apple notarization: if the system says the app is damaged, run `xattr -cr /Applications/Tianshu.app`. Windows needs WebView2 120 or newer, and Linux needs `libwebkit2gtk-4.1` and `libgtk-3`.
- The project was created on 15 May 2026 and changes fast: the package is already at version 3.32.1. Data lives in `~/.rivet` under the old name.
How to disable. Remove the CLI with `npm uninstall -g tianshu-harness`. The desktop app comes off the usual way: on macOS drag Tianshu from Applications to the trash, on Windows uninstall it from the installed programs list, on Linux delete the AppImage file. Data and settings stay in `~/.rivet`, which you delete by hand.
FAQ
Is this the same program as Rivet?
Yes. The project used to be called Rivet. The main command is now `tianshu`, and `rivet` stays as an alias for the same entry point. When moving from the old `tianshu-tui` package, remove it first with `npm uninstall -g tianshu-tui`, otherwise installing the new package stops with an `EEXIST` error.
What happens if the agent says "done" without checking?
The `deliver_task` call runs a delivery check: completion has to come with tests, a diff or a verification command. Without them the work goes back, while mechanical edits pass automatically. After the commit there is a second level, a review of the changes.
Where can I see what the CVM layer stopped?
`/cvm` shows interceptions live, and `/cockpit` with the subcommands `verify`, `advisory`, `model` and `safety` breaks down checks, runtime hints, cache and danger level. The log goes to `sensorium.jsonl`, found with `tianshu logs`; full records are turned on with the `RIVET_DEBUG_TELEMETRY=1` variable.
Which permission modes exist and what about untrusted projects?
Three modes: `/permission supervise` asks before every risky tool, `auto`, the default, asks only about risky ones, and `/yes` or `/yolo` turns questions off but enables the sandbox and rollback. A project without trust loads no hooks, MCP, memory or skills until you run `/trust` or pass `--trust`.
Does memory persist between sessions?
Project knowledge is written to `.rivet/knowledge/memory.jsonl`, and only rules and constraints are injected into a new session automatically. `/handoff` prepares a five-section handoff document, and a double Esc rewinds the session to a chosen point.
Can I connect a local model?
Yes, any OpenAI-compatible endpoint works, including Ollama and vLLM. Besides the main providers there are 25 ready presets, among them OpenRouter, SiliconFlow and OpenAI. The model changes mid-session with `/model`.
Discussion
No questions or reviews yet.
Related
CLI toolsA Python terminal coding agent in the manner of Claude Code: reads the repository, edits files, runs commands, with memory, sub-agents and MCP
A terminal UI plugin for DeepSeek Harness: live status line, streaming thoughts, double-Esc rollback, context progress and a TPS gauge
An open-source TypeScript terminal coding agent tuned for DeepSeek models and cheap caching
Linghun is a terminal coding agent built on evidence: it reads code before answering, verifies edits with tests and checkpoints git before changes
A Rust SDK for coding agents and the ready-made abstract CLI: REPL, 34 tools, MCP, graph memory, Anthropic and OpenAI, JSON output for CI
Repository Harness installs an AGENTS.md entrypoint, a document map and explicitly invoked onboarding skills into a repo and updates them safely
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Repository stars | Main difference |
|---|---|---|---|
| Tianshu Harness (this entry) | no | 1,145 | |
| OpenCode | no | 220,004 | an open coding agent for the terminal and desktop with build and plan modes |
| Crush | no | 28,756 | a terminal agent from Charm: mid-session model switching, LSP, MCP and Agent Skills |
| DeepSeek Harness | yes | 257,487 | DeepSeek's own agent where every feature is built as a plugin |
README in short
The documentation covers installing the desktop app for macOS, Windows and Linux and the terminal CLI, a first session that reads the project and then takes a multi-step task, three places to check the result, permission modes, a provider table and 16 star domains. Alongside are a user guide, guides for installation, permissions, providers and vision, the architecture, a changelog and contributor rules. The main text is translated into English, Japanese and Korean. The author reports more than 21,000 tests on `node:test`.