⌚ Claude Companion

Ce serveur relaie les hooks Claude Code vers ta montre. Adresse du serveur : https://claude-companion.codingpacer.fr

1. Sur la montre

Paramètres › Ordinateurs et cloud › Nouveau code. Note le code XXXX-XXXX-XXXX. Prévois un code par ordinateur ou par environnement cloud : chacun se révoque séparément.

2. Sur chaque ordinateur (terminal, IDE, appli Desktop, Remote Control)

Une seule commande, avec ton code :

claude plugin install watch-companion --marketplace Pelagoss/claude-companion \
  --config server_url=https://claude-companion.codingpacer.fr --config code=XXXX-XXXX-XXXX

Le code est rangé dans le trousseau du système, pas dans settings.json. Sans --config, Claude Code demande les deux valeurs (/plugin › watch-companion › Configure options). Il faut curl, présent par défaut sur macOS, Linux et Windows 10+.

3. Sessions cloud (claude.ai/code)

Les sessions cloud ne chargent pas les plugins. Ajoute ce bloc au .claude/settings.json du dépôt (télécharger), puis, dans les paramètres de ton environnement cloud :

Chaque personne qui travaille sur le dépôt met son propre code : sans code, le hook ne fait rien.

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "allowedEnvVars": [
              "CLAUDE_COMPANION_CODE",
              "CLAUDE_CODE_REMOTE_SESSION_ID"
            ],
            "headers": {
              "Authorization": "Bearer $CLAUDE_COMPANION_CODE",
              "X-Claude-Remote-Session": "$CLAUDE_CODE_REMOTE_SESSION_ID"
            },
            "timeout": 5,
            "type": "http",
            "url": "https://claude-companion.codingpacer.fr/h"
          }
        ]
      }
    ],
    "PreCompact": [
      {
        "hooks": [
          {
            "allowedEnvVars": [
              "CLAUDE_COMPANION_CODE",
              "CLAUDE_CODE_REMOTE_SESSION_ID"
            ],
            "headers": {
              "Authorization": "Bearer $CLAUDE_COMPANION_CODE",
              "X-Claude-Remote-Session": "$CLAUDE_CODE_REMOTE_SESSION_ID"
            },
            "timeout": 5,
            "type": "http",
            "url": "https://claude-companion.codingpacer.fr/h"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "hooks": [
          {
            "allowedEnvVars": [
              "CLAUDE_COMPANION_CODE",
              "CLAUDE_CODE_REMOTE_SESSION_ID"
            ],
            "headers": {
              "Authorization": "Bearer $CLAUDE_COMPANION_CODE",
              "X-Claude-Remote-Session": "$CLAUDE_CODE_REMOTE_SESSION_ID"
            },
            "timeout": 5,
            "type": "http",
            "url": "https://claude-companion.codingpacer.fr/h"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "allowedEnvVars": [
              "CLAUDE_COMPANION_CODE",
              "CLAUDE_CODE_REMOTE_SESSION_ID"
            ],
            "headers": {
              "Authorization": "Bearer $CLAUDE_COMPANION_CODE",
              "X-Claude-Remote-Session": "$CLAUDE_CODE_REMOTE_SESSION_ID"
            },
            "timeout": 5,
            "type": "http",
            "url": "https://claude-companion.codingpacer.fr/h"
          }
        ]
      }
    ],
    "StopFailure": [
      {
        "hooks": [
          {
            "allowedEnvVars": [
              "CLAUDE_COMPANION_CODE",
              "CLAUDE_CODE_REMOTE_SESSION_ID"
            ],
            "headers": {
              "Authorization": "Bearer $CLAUDE_COMPANION_CODE",
              "X-Claude-Remote-Session": "$CLAUDE_CODE_REMOTE_SESSION_ID"
            },
            "timeout": 5,
            "type": "http",
            "url": "https://claude-companion.codingpacer.fr/h"
          }
        ]
      }
    ],
    "SubagentStop": [
      {
        "hooks": [
          {
            "allowedEnvVars": [
              "CLAUDE_COMPANION_CODE",
              "CLAUDE_CODE_REMOTE_SESSION_ID"
            ],
            "headers": {
              "Authorization": "Bearer $CLAUDE_COMPANION_CODE",
              "X-Claude-Remote-Session": "$CLAUDE_CODE_REMOTE_SESSION_ID"
            },
            "timeout": 5,
            "type": "http",
            "url": "https://claude-companion.codingpacer.fr/h"
          }
        ]
      }
    ]
  }
}