Skip to content

Conversation

hongkongkiwi
Copy link
Contributor

@hongkongkiwi hongkongkiwi commented Aug 12, 2025

Summary

  • Add comprehensive hooks system with 5 hook types (PreToolUse, PostToolUse, Notification, Stop, SubagentStop)
  • Implement 2-tier configuration precedence (global user config + local project config)
  • Automatic .gitignore management for local settings
  • Security controls with GROQ_NO_LOCAL_HOOKS environment variable
  • Complete CLI management interface via /hooks command

Note: We currently do not have mcps/tools configurable, but this adds support for that in the hooks for later when it's added

Test plan

  • Test global hooks configuration in ~/.groq/local-settings.json
  • Test local project hooks in .groq/local-settings.json
  • Verify hooks precedence (local overrides global)
  • Test all hook types (PreToolUse blocking/non-blocking, PostToolUse, etc.)
  • Verify automatic .gitignore updates
  • Test security controls with GROQ_NO_LOCAL_HOOKS=true
  • Test /hooks command with all subcommands (list, enable, disable, reload, example, init)

@hongkongkiwi hongkongkiwi changed the title feat: Add hooks support feat: add support for hooks Aug 12, 2025
- Implement shell command hooks for events (pre/post tool calls, prompts, errors)
- Support both user-level (~/.groq-code/hooks/) and project-level (.groq-code/hooks/) hooks
- Add proper precedence: project hooks override user hooks
- Automatically add .groq-code to .gitignore for security
- Include comprehensive test coverage and TypeScript interfaces
- Apply CodeRabbit recommendations and fix Biome lint errors
@hongkongkiwi hongkongkiwi force-pushed the feature/add-hooks-support branch from 3b5002c to 2634817 Compare August 12, 2025 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant