m0x logoM0X
Back/hooks

Hooks

Lifecycle hooks for AI interactions.

Define scripts to run before or after AI actions. For example, run `npm run lint --fix` automatically after the Agent edits a file to clean up formatting.

Configuration

Hooks are defined in `.m0x/hooks.json`. You can trigger them on events like `on_edit_complete`, `on_chat_response`, or `on_terminal_command`.