Command line
Every command of harness-kit, generated from the kit's effect/cli command tree.
Global flags
Every command takes these flags.
| Flag | Value | Required | Description |
|---|---|---|---|
--help, -h | boolean | no | Show help information |
--version, -v | boolean | no | Show version information |
--wizard | boolean | no | Start wizard mode for a command |
--completions | <bash|zsh|fish|powershell|sh|pwsh> | no | Print shell completion script (choices: bash, zsh, fish, powershell, sh, pwsh) |
--log-level | <all|trace|debug|info|warn|warning|error|fatal|none> | no | Sets the minimum log level (choices: all, trace, debug, info, warn, warning, error, fatal, none) |
--config | string | no | The harness configuration to use instead of harness.config.ts or harness.config.json at the repository root |
harness-kit
Agent-harness guardrails for Claude Code; a hook configuration runs harness-kit hook <event>
harness-kit <subcommand> [flags]Subcommands:
harness-kit hookharness-kit configharness-kit explainharness-kit gatesharness-kit gateharness-kit protocolharness-kit settingsharness-kit tracker
harness-kit hook
Answer a Claude Code hook: read the payload on standard input and exit with the decision
harness-kit hook [flags] <event>| Argument | Value | Required | Description |
|---|---|---|---|
event | choice | yes | The Claude Code hook event the payload is sent for |
harness-kit config
The harness configuration
harness-kit config <subcommand> [flags]Subcommands:
harness-kit config check
harness-kit config check
Decode the harness configuration, ask each adapter for its capabilities and check the hook entries of the settings, naming every problem and its fix
harness-kit config check [flags]| Flag | Value | Required | Description |
|---|---|---|---|
--plugin | directory | no | The plugin folder whose configuration and hooks/hooks.json to check instead of the project's |
--root | directory | no | The project folder whose harness configuration and .claude/settings.json to use instead of the repository root of CLAUDE_PROJECT_DIR or the working directory |
harness-kit explain
Print the Policies that run for the Claude Code payload on standard input, each Decision and its timing, and the merged answer, without writing session state
harness-kit explain [flags]harness-kit gates
The checks a repository must pass
harness-kit gates <subcommand> [flags]Subcommands:
harness-kit gates resolve
harness-kit gates resolve
Print the repository's gates: the project's own list, else its kind's default, then the derived gates the working copy calls for
harness-kit gates resolve [flags]| Flag | Value | Required | Description |
|---|---|---|---|
--json | boolean | no | Print the gates as one JSON array of {name, run, exclusive, timeout} instead of one command line per line |
harness-kit gate
Run a gate and await its outcome
harness-kit gate <subcommand> [flags]Subcommands:
harness-kit gate runharness-kit gate await
harness-kit gate run
Run a gate under a time limit, alone in its repository with --exclusive, and write a one-line finish record; exits as the record says (N, 128+N, 124)
harness-kit gate run [flags] <name> [<command...>]| Argument | Value | Required | Description |
|---|---|---|---|
name | string | yes | The gate's name: letters, digits, '.', '_' and '-' |
command... | string | no | The command to run and its arguments, after -- |
| Flag | Value | Required | Description |
|---|---|---|---|
--exclusive | boolean | no | Wait until no other exclusive run of the repository root runs, and hold it while this one runs |
--timeout | string | no | The time limit in seconds, waiting for the lock included; 3600 by default |
harness-kit gate await
Wait for a gate run and exit as it did; 75 while it still runs, 125 when it ended without a record
harness-kit gate await [flags] <record>| Argument | Value | Required | Description |
|---|---|---|---|
record | string | yes | The record path or run id a gate run printed |
| Flag | Value | Required | Description |
|---|---|---|---|
--for | string | no | How long to wait in seconds; 540 by default |
harness-kit protocol
The protocol of external Policies and adapters: <executable> <operation>, one JSON object in and one out
harness-kit protocol <subcommand> [flags]Subcommands:
harness-kit protocol schema
harness-kit protocol schema
Print the JSON Schemas of the messages external Policies and adapters exchange with the kit
harness-kit protocol schema [flags]harness-kit settings
The hook entries of Claude Code's settings that run harness-kit, written from the configuration
harness-kit settings <subcommand> [flags]Subcommands:
harness-kit settings syncharness-kit settings check
harness-kit settings sync
Write a hook entry for each event with an active Policy into .claude/settings.json or a plugin's hooks/hooks.json, keeping every other entry
harness-kit settings sync [flags]| Flag | Value | Required | Description |
|---|---|---|---|
--plugin | directory | no | The plugin folder whose hooks/hooks.json to use instead of the project's .claude/settings.json |
--root | directory | no | The project folder whose harness configuration and .claude/settings.json to use instead of the repository root of CLAUDE_PROJECT_DIR or the working directory |
harness-kit settings check
Fail when .claude/settings.json or a plugin's hooks/hooks.json does not hold the hook entries the configuration needs
harness-kit settings check [flags]| Flag | Value | Required | Description |
|---|---|---|---|
--plugin | directory | no | The plugin folder whose hooks/hooks.json to use instead of the project's .claude/settings.json |
--root | directory | no | The project folder whose harness configuration and .claude/settings.json to use instead of the repository root of CLAUDE_PROJECT_DIR or the working directory |
harness-kit tracker
Read and write the configured issue tracker: count, show, create, link, rank and transition issues
harness-kit tracker <subcommand> [flags]Subcommands:
harness-kit tracker countharness-kit tracker showharness-kit tracker createharness-kit tracker linkharness-kit tracker rankharness-kit tracker transition
harness-kit tracker count
Print how many issues match a query
harness-kit tracker count [flags] <query>| Argument | Value | Required | Description |
|---|---|---|---|
query | string | yes | The query, in the tracker's own query language, passed on as given |
harness-kit tracker show
Print an issue as Markdown: its fields as a table, then its description, and with --comments its comments
harness-kit tracker show [flags] <key>| Argument | Value | Required | Description |
|---|---|---|---|
key | string | yes | The key of the issue to show |
| Flag | Value | Required | Description |
|---|---|---|---|
--comments | boolean | no | Also print the comments on the issue, oldest first, each with its author and date |
harness-kit tracker create
Create an issue once: print the one the project already holds with the title, and search before any create is tried again
harness-kit tracker create [flags] <project> <title>| Argument | Value | Required | Description |
|---|---|---|---|
project | string | yes | The project or board the issue belongs to, such as T |
title | string | yes | The issue's title, which must keep the configured title rule |
| Flag | Value | Required | Description |
|---|---|---|---|
--description | string | no | The issue's description, as Markdown |
--field | key=value | no | A field by its tracker-specific name, as name=value; a value that reads as JSON is sent as that JSON, any other as text; repeatable |
--parent | string | no | The key of the parent issue |
--type | string | no | The issue type, by its name on the tracker |
harness-kit tracker link
Link two issues: FROM stands in the relation TYPE to TO, such as T-1 blocks T-2
harness-kit tracker link [flags] <from> <to> <type>| Argument | Value | Required | Description |
|---|---|---|---|
from | string | yes | The issue that stands in the relation, such as the one that blocks |
to | string | yes | The issue it stands in the relation to, such as the one that is blocked |
type | string | yes | The link type, by the name the tracker's configuration gives it, such as blocks |
harness-kit tracker rank
Rank issues on the board: put KEYS, in their order, right after ANCHOR
harness-kit tracker rank [flags] <anchor> <keys...>| Argument | Value | Required | Description |
|---|---|---|---|
anchor | string | yes | The issue the others go right after |
keys... | string | yes | The issues to put after the anchor, in their order |
harness-kit tracker transition
Move an issue to a status through the tracker's transition, and print the status it then has
harness-kit tracker transition [flags] <key> <status>| Argument | Value | Required | Description |
|---|---|---|---|
key | string | yes | The key of the issue to move |
status | string | yes | The status to move the issue to, by the name the tracker or its configuration gives it, such as "In Progress" |