hooks

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuditLogPath added in v0.6.0

func AuditLogPath() (string, error)

AuditLogPath returns the path to the hook audit log file.

func GetHookCommand added in v1.0.4

func GetHookCommand() string

GetHookCommand returns the command string currently registered in the hook, or "" if not found.

func Install

func Install()

Install registers the chop hook in ~/.claude/settings.json.

func IsInstalled added in v0.12.0

func IsInstalled() (bool, string)

IsInstalled checks whether the chop hook is registered in ~/.claude/settings.json.

func RunHook

func RunHook()

RunHook reads a Claude Code PreToolUse hook payload from stdin, checks if the command should be wrapped with chop, and outputs modified JSON on stdout. Always exits 0.

func Uninstall

func Uninstall()

Uninstall removes the chop hook from ~/.claude/settings.json.

Types

This section is empty.

Jump to

Keyboard shortcuts

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