hook

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeHookEntry

type ClaudeHookEntry struct {
	Matcher string   `json:"matcher"`
	Hooks   []string `json:"hooks"`
}

ClaudeHookEntry represents a single hook entry in Claude Code's settings

type Hook

type Hook struct {
	Type    string `json:"type"`    // PreToolUse, PostToolUse, Notification, Stop, UserPromptSubmit
	Matcher string `json:"matcher"` // Tool matcher (e.g., "Bash", "Edit", "*")
	Command string `json:"command"` // Shell command to run
	Source  string `json:"-"`       // Which tool this hook came from (e.g., "claude")
}

Hook represents a configured hook

func LoadAll

func LoadAll() ([]*Hook, error)

LoadAll loads hooks from all supported tools

func LoadFromClaudeSettings

func LoadFromClaudeSettings() ([]*Hook, error)

LoadFromClaudeSettings loads hooks from Claude Code's settings.json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL