Skip to content

Claude Code

TapPass installs PreToolUse and PostToolUse hooks into Claude Code. Every file read, bash command, and model call is policy-checked and audited.

Terminal window
tappass claude-code install \
--gateway https://tappass.example.com \
--api-key tp_...

This:

  1. Writes a hook script to ~/.tappass/tappass-hook.sh
  2. Merges PreToolUse and PostToolUse entries into ~/.claude/settings.json
  3. Sets TAPPASS_HOOK_API_KEY for the hook
HookWhenWhat’s logged
PreToolUseBefore Claude invokes a toolTool name, inputs, agent identity, session
PostToolUseAfter the tool returnsOutputs (redacted), duration, status

The hook returns a non-zero exit code when policy denies a tool use. tool_decision.rego controls this server-side — no Claude Code restart required when you update policy.

package tool_decision
# Block `Bash` calls with `rm -rf` in dev environment
deny[msg] {
input.tool == "Bash"
contains(input.args.command, "rm -rf")
msg := "dangerous-rm"
}
Terminal window
tappass claude-code uninstall

Removes the hooks from ~/.claude/settings.json. Leaves ~/.tappass/ in place in case you re-enable.

Terminal window
tappass claude-code status

Prints whether hooks are registered and whether the gateway is reachable.