mirror of
https://github.com/Homebrew/brew.git
synced 2026-10-28 09:34:42 +08:00
Add AI hooks
These should help Claude Code and Cursor agents run more effectively.
This commit is contained in:
3 files changed
+55
No files matched your search
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"hooks": {
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Edit|Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "brew style --changed --fix"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "brew typecheck"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stop": [
|
||||
{
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "brew tests --changed",
|
||||
"timeout": 360
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"hooks": {
|
||||
"afterFileEdit": [
|
||||
{
|
||||
"command": "brew style --changed --fix"
|
||||
},
|
||||
{
|
||||
"command": "brew typecheck"
|
||||
}
|
||||
],
|
||||
"stop": [
|
||||
{
|
||||
"command": "brew tests --changed"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -201,3 +201,10 @@
|
||||
!/.sublime
|
||||
/.sublime/homebrew.sublime-workspace
|
||||
!/.vscode
|
||||
|
||||
# Unignore AI configuration
|
||||
!/.cursor
|
||||
!/.claude
|
||||
|
||||
# Ignore local AI configuration
|
||||
/.claude/settings.local.json
|
||||
Reference in new issue
Block a user