Skip to Content
harness-kit

Command line

Every command of harness-kit, generated from the kit's effect/cli command tree.

Global flags

Every command takes these flags.

FlagValueRequiredDescription
--help, -hbooleannoShow help information
--version, -vbooleannoShow version information
--wizardbooleannoStart wizard mode for a command
--completions<bash|zsh|fish|powershell|sh|pwsh>noPrint shell completion script (choices: bash, zsh, fish, powershell, sh, pwsh)
--log-level<all|trace|debug|info|warn|warning|error|fatal|none>noSets the minimum log level (choices: all, trace, debug, info, warn, warning, error, fatal, none)
--configstringnoThe 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 hook
  • harness-kit config
  • harness-kit explain
  • harness-kit gates
  • harness-kit gate
  • harness-kit protocol
  • harness-kit settings
  • harness-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>
ArgumentValueRequiredDescription
eventchoiceyesThe 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]
FlagValueRequiredDescription
--plugindirectorynoThe plugin folder whose configuration and hooks/hooks.json to check instead of the project's
--rootdirectorynoThe 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]
FlagValueRequiredDescription
--jsonbooleannoPrint 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 run
  • harness-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...>]
ArgumentValueRequiredDescription
namestringyesThe gate's name: letters, digits, '.', '_' and '-'
command...stringnoThe command to run and its arguments, after --
FlagValueRequiredDescription
--exclusivebooleannoWait until no other exclusive run of the repository root runs, and hold it while this one runs
--timeoutstringnoThe 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>
ArgumentValueRequiredDescription
recordstringyesThe record path or run id a gate run printed
FlagValueRequiredDescription
--forstringnoHow 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 sync
  • harness-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]
FlagValueRequiredDescription
--plugindirectorynoThe plugin folder whose hooks/hooks.json to use instead of the project's .claude/settings.json
--rootdirectorynoThe 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]
FlagValueRequiredDescription
--plugindirectorynoThe plugin folder whose hooks/hooks.json to use instead of the project's .claude/settings.json
--rootdirectorynoThe 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 count
  • harness-kit tracker show
  • harness-kit tracker create
  • harness-kit tracker link
  • harness-kit tracker rank
  • harness-kit tracker transition

harness-kit tracker count

Print how many issues match a query

harness-kit tracker count [flags] <query>
ArgumentValueRequiredDescription
querystringyesThe 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>
ArgumentValueRequiredDescription
keystringyesThe key of the issue to show
FlagValueRequiredDescription
--commentsbooleannoAlso 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>
ArgumentValueRequiredDescription
projectstringyesThe project or board the issue belongs to, such as T
titlestringyesThe issue's title, which must keep the configured title rule
FlagValueRequiredDescription
--descriptionstringnoThe issue's description, as Markdown
--fieldkey=valuenoA 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
--parentstringnoThe key of the parent issue
--typestringnoThe issue type, by its name on the tracker

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>
ArgumentValueRequiredDescription
fromstringyesThe issue that stands in the relation, such as the one that blocks
tostringyesThe issue it stands in the relation to, such as the one that is blocked
typestringyesThe 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...>
ArgumentValueRequiredDescription
anchorstringyesThe issue the others go right after
keys...stringyesThe 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>
ArgumentValueRequiredDescription
keystringyesThe key of the issue to move
statusstringyesThe status to move the issue to, by the name the tracker or its configuration gives it, such as "In Progress"

On this page