Skip to content

The command

The agent-harness-adapter command installs your own setup (the config) or a tool’s integration (a manifest), and runs hooks.

Terminal window
npm install -g @six5536/agent-harness-adapter # prebuilt: Linux, macOS (x64, arm64), Windows (x64)
cargo install agent-harness-adapter # from source

A tool in any language ships a manifest (TOML, or JSON) and calls the command:

mytool.harness.toml
# mytool's integration as a manifest, for the agent-harness-adapter command.
version = 1
name = "mytool"
instructions = "Run `mytool check` before you finish.\n"
allow_commands = ["mytool"]
[[skills]]
name = "mytool"
description = "Check the project with mytool."
body = "Run `mytool check`; fix what it reports.\n"
[[hooks]]
event = "pre-tool"
tools = "shell"
run = "mytool hook" # bridged: mytool answers in Claude Code's protocol
Terminal window
agent-harness-adapter install --manifest mytool.harness.toml --harness claude,codex,gemini

A bridged hook (run) is a plain command in any language: Claude Code’s hook input on stdin, Claude Code’s answer back.

mytool hook
#!/bin/sh
# `mytool hook`, bridged: Claude Code's hook input on stdin, in every agent.
if grep -q 'rm -rf'; then
echo "mytool: no rm -rf here" >&2
exit 2
fi

See the hook contract.

agent-harness-adapter install [--manifest <file>] [--harness <ids|all>] [--scope project|user|local] [--root <dir>] [--name <name>] [--force] [--without <parts>] [--migrate] [--json]
agent-harness-adapter uninstall [--manifest <file>] [--harness <ids|all>] [--scope ..] [--root <dir>] [--force] [--json]
agent-harness-adapter status [--manifest <file>] [--harness <ids|all>] [--scope ..] [--root <dir>] [--json]
agent-harness-adapter hook [--tool <name>] [--tools <kind>] <harness> <event> -- <command> [args..]
agent-harness-adapter hook --hooks <path> <harness> <event>
agent-harness-adapter schema <manifest|hooks|hook-input|hook-answer|result>
  • Without --manifest, the commands use the config; the first install writes it.
  • Harnesses: --harness, else the ones installed before, else (in a terminal) a question with the agents found on PATH picked. Without a terminal, the first install needs --harness. uninstall without it removes them all.
  • Harness ids: claude, codex, factory, gemini, copilot, cursor, pi, opencode, kilo, qwen, devin, agents; all is every one with files at the scope.
  • --json prints the result as JSON (schema result).
Code Means
0 done
1 status: an install would change something
2 refused: error: <message> on stderr