beta

agex Context Freshness Check

Hooks

Startup hook that checks if your agex artifacts are up to date and warns about available updates.

2703/26/2026
json1 file
hooks.json471 B
{
  "PostToolUse": [
    {
      "matcher": "Bash",
      "hooks": [
        {
          "type": "command",
          "command": "if [ -f agex.toml ] && [ ! -f /tmp/.agex-checked-$(date +%Y%m%d) ]; then touch /tmp/.agex-checked-$(date +%Y%m%d); UPDATES=$(agex update --check 2>/dev/null | grep -c '↑' || echo 0); if [ "$UPDATES" -gt 0 ]; then echo "agex: $UPDATES artifact update(s) available. Run 'agex update' to apply."; fi; fi; exit 0"
        }
      ]
    }
  ]
}