The command
The agent-harness-adapter command installs your own setup (the config) or a
tool’s integration (a manifest), and runs hooks.
Install
Section titled “Install”npm install -g @six5536/agent-harness-adapter # prebuilt: Linux, macOS (x64, arm64), Windows (x64)cargo install agent-harness-adapter # from sourceInstall a tool’s integration
Section titled “Install a tool’s integration”A tool in any language ships a manifest (TOML, or JSON) and calls the command:
# mytool's integration as a manifest, for the agent-harness-adapter command.version = 1name = "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 protocolagent-harness-adapter install --manifest mytool.harness.toml --harness claude,codex,geminiAnswer a hook
Section titled “Answer a hook”A bridged hook (run) is a plain command in any language: Claude Code’s hook
input on stdin, Claude Code’s answer back.
#!/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 2fiSee the hook contract.
Commands
Section titled “Commands”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 firstinstallwrites it. - Harnesses:
--harness, else the ones installed before, else (in a terminal) a question with the agents found onPATHpicked. Without a terminal, the firstinstallneeds--harness.uninstallwithout it removes them all. - Harness ids:
claude,codex,factory,gemini,copilot,cursor,pi,opencode,kilo,qwen,devin,agents;allis every one with files at the scope. --jsonprints the result as JSON (schema result).
Exit codes
Section titled “Exit codes”| Code | Means |
|---|---|
| 0 | done |
| 1 | status: an install would change something |
| 2 | refused: error: <message> on stderr |