hooks

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AJHooks

func AJHooks() map[string][]MatcherGroup

AJHooks returns the hook configuration for all AJ hook events.

func InstallHooks

func InstallHooks(settingsPath string) error

InstallHooks merges AJ hooks into the given Claude Code settings file. Creates the file if it doesn't exist. Preserves existing hooks and settings. Idempotent -- replaces any existing AJ/legacy hooks with current versions.

func UninstallHooks

func UninstallHooks(settingsPath string) error

UninstallHooks removes AJ hooks from the given Claude Code settings file. Preserves all non-AJ hooks and settings.

Types

type HookHandler

type HookHandler struct {
	Type    string `json:"type"`
	Command string `json:"command"`
	Async   bool   `json:"async,omitempty"`
}

HookHandler represents a single hook handler in Claude Code settings.

type MatcherGroup

type MatcherGroup struct {
	Matcher string        `json:"matcher,omitempty"`
	Hooks   []HookHandler `json:"hooks"`
}

MatcherGroup represents a matcher group containing handlers.

Jump to

Keyboard shortcuts

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