beta

agex Auto-Sync Hook

Hooks

Post-session hook that detects changes to tracked agent files and offers to push updates to agex.dev.

1803/26/2026

Version 1

Published

Initial version

Created 3/26/2026

Initial version — no previous version to compare

Hook Script
{
  "PostToolUse": [
    {
      "matcher": "Write|Edit",
      "hooks": [
        {
          "type": "command",
          "command": "FILE=$(jq -r '.tool_input.file_path // empty'); if [ -f agex.toml ] && echo "$FILE" | grep -qE '(CLAUDE\.md|AGENTS\.md|GEMINI\.md|\.cursorrules|SKILL\.md|\.mcp\.json|hooks\.json)'; then echo "NOTE: Agent config file changed: $FILE. Run 'agex push $FILE' to update on agex.dev."; fi; exit 0"
        }
      ]
    }
  ]
}