Skip to main content

Module tool_hooks

Module tool_hooks 

Source

Structs§

ToolHookConfig
A tool hook configuration for a specific AI coding tool.

Enums§

HookPlatform
Which AI tool platform is invoking the hook. Each platform has a different JSON output format.
HookScope
InstallScope
Where hooks should be written.
ToolFilter
Which tools sqz init should configure.

Constants§

SUPPORTED_TOOL_NAMES
Every canonical tool name sqz knows about, in the same order generate_hook_configs emits them. Used by the CLI to list valid options in --only/--skip error messages, and by tests that need to enumerate the supported set.

Functions§

canonicalize_tool_name
Normalise a tool name or alias to its canonical form.
claude_user_settings_path
Resolve ~/.claude/settings.json for the current user.
generate_hook_configs
Generate hook configuration files for all supported AI tools.
install_tool_hooks
Install hook configs for detected AI tools in the given project directory.
install_tool_hooks_scoped
Like install_tool_hooks but lets the caller choose between project-local and user-global scope. This is the function sqz init and sqz init --global both call.
install_tool_hooks_scoped_filtered
Like install_tool_hooks_scoped but honours a ToolFilter so callers can restrict sqz init to a subset of the supported tools.
parse_tool_list
Parse a user-supplied tool list (comma-separated, whitespace-tolerant) into a vector of canonical names.
process_hook
Process a PreToolUse hook invocation from an AI tool.
process_hook_cursor
Process a hook invocation for Cursor (different output format).
process_hook_gemini
Process a hook invocation for Gemini CLI.
process_hook_kiro
Process a hook invocation for Kiro (IDE and CLI).
process_hook_windsurf
Process a hook invocation for Windsurf.
remove_claude_global_hook
Remove sqz’s hook entries from ~/.claude/settings.json without touching any other keys. Symmetric with [install_claude_global].