harnessweaver-cli
Developer tooling for HarnessWeaver. Installs the harnessweaver command. The full reference, with every option and exit code, is docs/cli.md.
uv add --dev harnessweaver-cli
harnessweaver --help
Start a project
harnessweaver init invoice-bot # the extraction template; -t picks another
cd invoice-bot
harnessweaver spec validate --env offline # load it the way the app will
harnessweaver test # its tests, offline
init copies a template and puts the project name in it; there is no template
language. A plugin's templates are named <namespace>.<template>
(harnessweaver init -t acme.rag). Every template's output passes its own tests
(RULES T6).
| Template | What you get |
|---|---|
extraction (default) |
Typed extraction with schema validation, one repair, PII and secrets guards, a golden set |
rag |
A session flow that routes the question, retrieves ACL-checked passages and answers with citations the output guard checks |
agent |
A Pydantic AI agent with two governed tools, one of them approval-gated, a policy rule and a red-team eval set |
workflow |
A three-stage step graph: a parallel stage, then a reply in an evaluator-optimizer loop |
chat |
A chat turn with memory, a topic guard and a streamed answer moderated chunk by chunk |
Commands
| Command | What it does |
|---|---|
init [DIR] [-t TEMPLATE] [--name NAME] [--force] |
Start a project: harness.yaml, an offline overlay, code, a prompt, evals and tests. Never overwrites without --force |
spec validate [SPEC] [-e ENV] [--format text|json] |
Load the spec with every check the app runs: layers, locks, bounds, plugins, tasks, reachable hooks (R4). Prints the adoption level |
spec explain [SPEC] [--path PREFIX] |
Every effective value, the layer it came from, and its locks and bounds |
spec diff BEFORE AFTER [--exit-code] |
Compare two effective specs as Markdown, for PR comments. Either side can be git:<ref>:<path>, read with the profiles committed at that ref |
doctor [SPEC] [--strict] |
Adoption level and what the next level needs, hooks each task's runner reaches, duplicate retry owners (R5), unpinned profiles, shadow guards (R8), content capture (R9), plugin installation problems. Exits 1 on a failure, or on a warning with --strict |
hooks [SPEC] [--task TASK] |
The middleware on every hook point in the order it runs, with band, fail mode and timeout |
test [-e ENV] [PYTEST ARGS...] |
Run the app's tests with HARNESSWEAVER_TEST_MODE=1 and the offline overlay |
contracts export [DIR] [--check] |
Write the JSON Schema of every contract, or report drift |
eval run [SPEC] [--suite NAME] [--task TASK] [--update-baseline] |
Run the spec's eval suites, compare with .harness/baselines, print the shadow-guard report. Exits 1 on a missed threshold or a regression, 2 when the suites can't run |
eval report [SPEC] [--task TASK] |
The production runs online evals sampled and graded |
policy test [SPEC] [--cases FILE] |
Check a table of tool calls (policy_tests.yaml) against the governor's verdicts, as a dry run |
replay RUN_ID [SPEC] |
Run a recorded run again against the current code and spec, and show what changed |
add guard USE [SPEC] [--stage S] [--id ID] [--action A] [--set KEY=VALUE] |
Add a guard in shadow mode (mode: log_only, R8). Comments in harness.yaml are kept; an edit that doesn't load is taken back |
add tool MODULE:FUNCTION [SPEC] [--dir tools] [--risk R] [--side-effect S] |
Write a tool manifest from the function's signature and docstring, and add its directory to tools.manifests |
tools pin [SPEC] [--tool NAME] |
Write each manifest's definition_digest, so a tool that changes unreviewed is blocked (S2) |
plugin new NAMESPACE [DIR] |
Scaffold a standalone plugin package with a sample guard and tests that run the conformance suite |
plugin list [--format text|json] |
Installed plugins: namespace, distribution, version, contract range, compatibility |
sidecar [SPEC] [-e ENV] [--host H] [--port P] [--token-env VAR] |
Serve the spec to other languages: runs harnessd (needs harnessweaver-sidecar and a token, S6) |
gateway litellm [SPEC] [-o FILE] |
A LiteLLM Proxy config from the spec: gateway models and aliases, retries, a timeout, no message logging, and a tool-permission guardrail from the manifests |
gateway mcp [SPEC] [-o FILE] |
A neutral tool allow-list for an MCP gateway: each allowed tool's server, digest and scopes, and the withheld tools with the reason |
dev [SPEC] [-e ENV] [--up] |
Write .harness/dev/: LiteLLM, an OTel collector, Langfuse and harnessd in a Compose file, wired to the spec, with local secrets in .env. --up starts it |
Every command that takes SPEC defaults to harness.yaml, takes
--profile-dir to find org:// profiles, and makes the spec's directory
importable, as it is when the app runs from there.
Metadata
Release files for harnessweaver-cli 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| harnessweaver_cli-0.7.1.tar.gz | 63.7 kB | Without provenance | Details for harnessweaver_cli-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| harnessweaver_cli-0.7.1-py3-none-any.whl | Python 3 | none | any | Details for harnessweaver_cli-0.7.1-py3-none-any.whl |
Total release size: 146.9 kB
Release files / harnessweaver_cli-0.7.1.tar.gz
| Download URL | harnessweaver_cli-0.7.1.tar.gz |
|---|---|
| Size | 63.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6220db2134f4b6f148a63d42b24d6599190fcac778f357754e9d65d9b436789a
|
|
BLAKE2b-256 checksum How to use checksums |
18c07fa223c941bf22b18fa3129b16c7453359ca75d05574a023b8cfbbb76afd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / harnessweaver_cli-0.7.1-py3-none-any.whl
| Download URL | harnessweaver_cli-0.7.1-py3-none-any.whl |
|---|---|
| Size | 83.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
05014cf0d70cf1b26d4296e04374ecf0c1fa53eddc11f3c231ee481d6d43e9ed
|
|
BLAKE2b-256 checksum How to use checksums |
796d53dd024e819624e171a1a4e73e5b780087f9cb1fa8da972a8d9ed103e003
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for harnessweaver-cli 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.