Kiro CLI
Install
Kiro's user-wide hooks require Kiro CLI 3:
nah hook kiro install
kiro-cli --v3
The installer writes the nah-owned hook at ~/.kiro/hooks/nah.json, or under
an existing canonical KIRO_HOME when that absolute path is configured. It
refuses symlinked Kiro roots and hook paths. Inspect its bytes and test a safe
block before relying on it. Remove only that file with:
nah hook kiro uninstall
Behavior
The global PreToolUse hook sees built-in and MCP tool calls. Shell calls use
nah's complete Bash analysis. Kiro CLI 3's read_file calls and documented
single-operation reads and writes expose their path to filesystem guards;
Kiro's batched filesystem calls and unmapped built-in or MCP tools remain
opaque and delegate. nah never approves a call, so every delegate continues
into Kiro's normal permission flow.
Definite blocks exit 2 with nah-branded feedback. Malformed calls delegate. Evaluation failure, including a missing or unexpectedly failing nah binary, exits 1 with fixed feedback; Kiro treats it as a warning and proceeds. nah does not impose an adapter-specific input-size limit.
Boundaries
This adapter targets Kiro CLI 3 because its global ~/.kiro/hooks/ support
applies across workspaces. Kiro CLI 2 embeds hooks in individual custom-agent
files; it cannot give nah equivalent coverage for the built-in default agent
and is not supported. Start the current Early Access engine with --v3.
Outside an intercepted call, a hook can be disabled with "enabled": false,
removed, shadowed by an alternate KIRO_HOME, or bypassed by a runtime surface
that does not load Kiro CLI 3 global hooks. Workspace hooks run alongside the
global hook. Delegated and subagent calls are covered only when Kiro emits
PreToolUse for them. The hook deadline is five seconds; runtime failures
other than exit 2 are non-blocking.
While active, this adapter blocks visible lifecycle commands and direct
mutations to its nah-owned hook. Visible child launches with an alternate
KIRO_HOME also block. A Kiro process started with a different home outside
the intercepted session remains the user's choice. The agent is told not to
retry protected changes; an operator can use nah nap from another terminal.
This integration is best effort: runtime APIs and hook behavior can change. Users are responsible for keeping the hook loaded and testing it after runtime upgrades; verify the latest official upstream documentation, including Kiro's current CLI 3 overview, CLI 3 hook reference, hook payload reference, and CLI changelog before relying on nah.