Observed since 20 Oct, 20:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
5harness
Agent-ready repository harness — global CLI with markdown durable SoT
Agent-ready repository harness — a global npm CLI that turns any software repo into a structured workspace for humans and coding agents.
The app is what users touch. The harness is what agents touch.
| Package | 5harness |
| Bin | harness |
| Source | github.com/vantanminh/5harness |
| Node | ≥ 22.5 |
| License | MIT |
Install and update with npm, bun, or pnpm. The package is a thin launcher: it downloads/runs the OS-native binary for your platform (not a Node.js CLI).
npm i -g 5harness
# or
bun add -g 5harness
# or
pnpm add -g 5harness
harness --version
npm update -g 5harness # or bun/pnpm equivalent, or `harness update`
Direct OS installers (no Node required) are a fallback:
Windows (PowerShell):
$version = "0.27.1"
Invoke-WebRequest "https://raw.githubusercontent.com/vantanminh/5harness/v$version/install/windows.ps1" -OutFile install-5harness.ps1
Get-Content .\install-5harness.ps1
powershell -ExecutionPolicy Bypass -File .\install-5harness.ps1
macOS:
VERSION=0.27.1
curl --proto '=https' --tlsv1.2 -fsSL "https://raw.githubusercontent.com/vantanminh/5harness/v${VERSION}/install/macos.sh" -o install-5harness.sh
less install-5harness.sh
bash install-5harness.sh
Linux:
VERSION=0.27.1
curl --proto '=https' --tlsv1.2 -fsSL "https://raw.githubusercontent.com/vantanminh/5harness/v${VERSION}/install/linux.sh" -o install-5harness.sh
less install-5harness.sh
bash install-5harness.sh
Point any native installer at a local build with HARNESS_INSTALL_FROM (directory or binary path). Pin a release with HARNESS_INSTALL_VERSION=<version> and use HARNESS_INSTALL_SKIP_PATH=1 in automation. Prefer npm/bun/pnpm for version management.
Project-local (optional):
npm i -D 5harness
npx harness --help
Releases use npm trusted publishing (OIDC) with provenance when configured. See docs/product/distribution.md.
cd /path/to/project
harness init # scaffold markdown + register this project
# after git clone of a harnessed repo on another machine:
harness link # register path + reindex committed history
harness intake --type spec_slice --summary "Add export API" --lane normal
harness intake update --id IN-001 --stories US-001
harness intake close IN-001
harness story add --id US-001 --title "Export API" --lane normal
harness story update --id US-001 --status implemented --unit 1 --integration 1 --e2e 0 --platform 0
harness decision add --id 0001 --title "Use markdown SoT" --doc docs/decisions/0001.md
harness query matrix
harness search "export"
harness get US-001
harness links US-001
harness doctor
harness next
harness dashboard # or bare: harness
| Feature | What it does |
|---|---|
| Init / link | Scaffold agent docs + markdown entities; register project in ~/.5harness |
| Durable history | Stories, decisions, intakes, backlog, reports as Git-backed markdown |
| Agent index | search / get / links / reindex — no whole-vault dumps |
| Tools-only mutation | Agents change operational entities only via CLI (or MCP tools) |
| Project Link | Opt-in roles and configured peers with bounded reads + target-owned reports |
| Quality loop | verify, trace, audit, propose |
| Agent loop | doctor, status, next, context, handoff, watch |
| MCP | Local harness mcp / dashboard MCP — reads + durable mutations (US-041) |
| Dashboard | Localhost multi-project UI + optional MCP monitoring |
| Cloud sync | Auto-sync after login; GitHub-like commits; hosted MCP for web AIs at https://5harness.knotree.com |
| Releases | CI multi-OS matrix, OIDC publish, GitHub Releases, SBOM |
Project Link lets related repositories declare roles, resolve explicitly configured peers, read bounded peer context, and exchange durable reports:
# frontend project
harness project role set frontend --stack supabase
harness project peer add <backend-project-id-or-path> --role backend
harness peer search "auth contract" --role backend
harness report add --to backend --summary "Login response contract mismatch"
# backend project
harness report list --status open
harness report get RP-001
harness report update --id RP-001 --status fixed --resolution "Updated response schema"
Role, stack, and peer ids are Git-backed markers in the managed AGENTS.md
block. Peer paths are not committed: both repositories must be registered in
the same machine-local ~/.5harness registry (or HARNESS_HOME). Reads are
limited to direct configured peers and bounded search / get / context /
links results; peer-of-peer traversal and arbitrary paths are rejected.
Reports are target-owned Git-backed entities under docs/reports/. Create and
update them only through harness report or its MCP tools, never by hand. Keep
payloads sanitized: do not include credentials, tokens, secrets, or unnecessary
personal data. Multi-user machines can restrict report targets with
HARNESS_PEER_WRITE_ROOTS, an OS-path-delimited list of existing absolute
directories. When set, CLI and MCP report creation fail closed for targets
outside those canonical roots. doctor reports policy mismatches in addition
to unresolved peers and missing peer indexes;
status summarizes Project Link state; next surfaces open reports before
planned backend work.
Both harness mcp and the dashboard's /mcp endpoint are OAuth 2.1 protected
resources. MCP clients discover the embedded authorization server through RFC
9728, dynamically register as public clients, and use Authorization Code with
mandatory PKCE S256. Access tokens are short-lived, opaque, and bound to the
canonical MCP resource URI. The server starts unbound: the working directory and
--dir do not authorize access to a project. During consent, the operator grants
either one healthy linked project or all healthy linked projects.
harness dashboard # MCP resource: http://127.0.0.1:3927/mcp
harness mcp # MCP resource: http://127.0.0.1:3928/mcp
harness dashboard set-password # replace the initial administrator password
A single-project grant always routes tools to the selected project. An all-projects grant requires the target project's durable id on every MCP request:
cd /path/to/project
harness project id # also stored as harness-project-id in AGENTS.md
# Preferred all-projects request selector:
X-Harness-Project: <project-id>
# Compatibility selector: append ?project=<project-id> to the MCP resource URI
Missing, conflicting, unknown, unlinked, or unavailable project ids fail closed. Agents must not infer authorization from cwd. See the project-binding specification and security model.
After binding the calling project, MCP tool discovery dynamically exposes peer
read and report tools only when that project has configured peers. In an
all-projects grant, X-Harness-Project still selects the calling project;
a peer id never substitutes for that OAuth binding. Cross-project
operational-entity mutation is restricted to sanitized reports owned by the
configured target project; explicit peer-management commands may also attempt
reverse configuration markers.
Plain HTTP is accepted only on loopback. A non-loopback bind requires an HTTPS
reverse proxy and its canonical URL, for example
harness mcp --host 0.0.0.0 --public-url https://mcp.example.com.
Product pivot: decision 0011.
Harness Cloud synchronizes durable markdown across devices and exposes a hosted MCP so a web AI (ChatGPT and others) can read a designated project's harness and write an implementation brief.
harness login # default https://5harness.knotree.com
harness sync push # once: store passphrase, then auto-sync on durable edits
harness sync status
harness plan get <token> # load a brief created by a web AI
harness login prints a short-lived device code and verification URL. Approve
the code in the browser; the CLI polls the Worker with PKCE and does not need a
loopback callback listener. After the first successful push, later durable CLI
mutations auto-sync as GitHub-like commits (id, time, author, client, changed
paths). Override the server with --server or HARNESS_CLOUD_URL. Check an
existing session with harness login --status.
The CLI still encrypts a restore snapshot with PBKDF2 + AES-256-GCM. A
user-scoped harness catalog is stored so hosted MCP can read entities without
source code. Connect a web AI to https://5harness.knotree.com/mcp with the
same account, ask it to research a project, then have it call
harness_plan_create. It should return:
please implement plan from harness --<token>
A coding agent loads the full plan and prompt with harness plan get <token>.
Configure and deploy using
docs/product/cloud-sync.md,
firebase/README.md, and web/README.md.
harness doctor --json, harness next --json. Then
the harness block in AGENTS.md or .agents/skills/harness/SKILL.md.
Do not dump the whole docs tree.harness intake / story / decision /
backlog / report — never hand-edit operational entity markdown.doctor / link / reindex, then
retry. Do not bypass with hand-edits.search, get, links, query matrix|stats, next
with --json.Full contract: AGENTS.md · docs/CONTEXT_RULES.md.
harness story verify runs the project-authored verify command from story
markdown (intentional local proof, like CI scripts).
Notable changes: CHANGELOG.md (Keep a Changelog + semver).
Draft assist from durable history:
harness export changelog [--since 2026-07-01]
| Area | Status |
|---|---|
| npm package | 5harness — bin harness (was @vantanminh/harness; see docs/DEPRECATION.md) |
init / link / registry | Shipped |
| Markdown durable SoT | Shipped |
| Query + agent index | Shipped |
| Quality (verify / trace / audit / propose) | Shipped |
| Agent-loop tools (doctor / status / next / …) | Shipped |
| Project Link (roles / peers / reports) | Shipped (v0.21+) |
| MCP core (reads + intake/story/decision/backlog mutations) | Shipped |
| Local dashboard + MCP monitor | Shipped |
| Cloud sync CLI + Firebase/Cloudflare surfaces | Shipped (optional) |
| CI multi-OS + OIDC provenance releases | Shipped |
| Legacy SQLite import | Optional (harness import-sqlite) |
npm install
npm run build
npm test
npm --prefix firebase/functions install
npm run cloud:build
npm run cloud:test
npm --prefix web install
npm run web:build
npm run web:test
npm run pack:check # tarball + version sync
# full gate:
npm run release:check
node dist/cli.js --help
# or: npm run harness -- --help
firebase/ or web/release:check on ubuntu / windows / macos × Node 22 + 24main): bump, tag, OIDC npm publish --provenance,
GitHub Release + SBOM (skip with [skip release])v* tagDetails: docs/product/distribution.md.
The CLI may print a one-line notice on stderr when a newer npm version exists.
Successful checks are cached for one hour under ~/.5harness/; transient npm
errors retry after five minutes. Disable with
HARNESS_NO_UPDATE_CHECK=1 (also auto-disabled when CI=true).
harness update # reinstall latest with detected package manager
harness upgrade # refresh harness block in project AGENTS.md
MIT — see LICENSE.
Thanks to the authors of repository-harness for ideas we studied while designing this product.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
commanderEnvironment{
"local_name": "commander",
"alias": false,
"peer_metadata": null
} | ^14.0.0 | runtime |
tsxEnvironment{
"local_name": "tsx",
"alias": false,
"peer_metadata": null
} | ^4.20.0 | development |
vitestEnvironment{
"local_name": "vitest",
"alias": false,
"peer_metadata": null
} | ^3.2.0 | development |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.8.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^24.0.0 | development |
Source distribution
{
"shasum": "6f02ac8b782c573f13f35d03749e147825f58de7",
"tarball": "https://registry.npmjs.org/5harness/-/5harness-0.13.0.tgz",
"fileCount": 337,
"integrity": "sha512-WhT+INysHzbXvgvCDHYh3/Z4hrjnDxEMYr0PPpK12N4D/m5urViw7nBzhR19Ne2+8iblYlvmm/YaA5WDIRSsOg==",
"signatures": [
{
"sig": "MEQCIC2/lyPvOJ6VxwdnmYFhTpLIbcJUqn/x3vyXgBskZHS1AiBqHj3V6SRfB9R0iFPuyDtQ2S2oLfcce8yeRX5e4zNONg==",
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
}
],
"attestations": {
"url": "https://registry.npmjs.org/-/npm/v1/attestations/5harness@0.13.0",
"provenance": {
"predicateType": "https://slsa.dev/provenance/v1"
}
},
"unpackedSize": 702756
}Observed since 20 Oct, 20:35 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:f727be00f526d2990aab74e8fdf9580adb2ef0892ba50973adc6be0ef4c91fad