JSPM

  • Created
  • Published
  • Downloads 1171
  • Score
    100M100P100Q117336F
  • License MIT

Telegram and Windows notifications for Claude Code task completion

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (claude-notification-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    claude-notification-plugin

    Notifications for Claude Code task completion. Sends alerts to Telegram and Windows when Claude finishes working.

    Features

    • Windows desktop notifications (toast)
    • Telegram bot messages
    • Sound alert
    • Voice announcement (TTS)
    • Separate notifications for task completion and waiting-for-input events
    • Skips short tasks (< 15s by default)
    • Granular per-channel enable/disable (globally and per-project)

    Install

    npm install -g claude-notification-plugin
    claude-notify-install

    The installer will:

    1. Ask for Telegram bot credentials (optional)
    2. Create config at ~/.claude/notifier.config.json
    3. Register hooks in ~/.claude/settings.json

    Configuration

    Config file: ~/.claude/notifier.config.json

    {
      "telegram": {
        "enabled": true,
        "token": "YOUR_BOT_TOKEN",
        "chatId": "YOUR_CHAT_ID",
        "deleteAfterHours": 24
      },
      "windowsNotification": {
        "enabled": true
      },
      "sound": {
        "enabled": true,
        "file": "C:/Windows/Media/notify.wav"
      },
      "voice": {
        "enabled": true
      },
      "minSeconds": 15,
      "notifyOnWaiting": false,
      "debug": false
    }

    Each channel has an enabled flag (true/false) for global control.

    deleteAfterHours — auto-delete old Telegram messages after the specified number of hours (default: 24, set 0 to disable).

    notifyOnWaiting — send notifications when Claude is waiting for user input, e.g. permission prompts (default: false, set true to enable).

    debug — include extra info in notifications for troubleshooting: voice phrase text when voice is enabled (default: false).

    Environment variables TELEGRAM_TOKEN and TELEGRAM_CHAT_ID override config file values.

    Per-channel environment variables

    These env vars override the global config per channel ("1" = on, "0" = off):

    Variable Channel
    CLAUDE_NOTIFY_TELEGRAM Telegram messages
    CLAUDE_NOTIFY_WINDOWS Windows toast notifications
    CLAUDE_NOTIFY_SOUND Sound alert
    CLAUDE_NOTIFY_VOICE Voice announcement (TTS)
    CLAUDE_NOTIFY_WAITING Waiting-for-input events
    CLAUDE_NOTIFY_DEBUG Debug mode

    Per-project configuration

    Add to .claude/settings.local.json in the project root to control channels per project:

    {
      "env": {
        "DISABLE_CLAUDE_NOTIFIER": 0,
        "CLAUDE_NOTIFY_TELEGRAM": 1,
        "CLAUDE_NOTIFY_WINDOWS": 1,
        "CLAUDE_NOTIFY_SOUND": 1,
        "CLAUDE_NOTIFY_VOICE": 1,
        "CLAUDE_NOTIFY_WAITING": 1,
        "CLAUDE_NOTIFY_DEBUG": 0
      }
    }

    To disable all notifications for a project:

    {
      "env": {
        "DISABLE_CLAUDE_NOTIFIER": "1"
      }
    }

    Telegram Setup

    1. Open Telegram, find @BotFather
    2. Send /newbot, follow prompts, pick a name
    3. Copy the bot token (format: 123456789:ABCdef...)
    4. Send any message to your new bot
    5. Open https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
    6. Find "chat":{"id":123456789} in the response — that's your Chat ID
    7. Run claude-notify-install and enter the token and chat ID

    Alternative for Chat ID: add @userinfobot to a chat and it will reply with the ID.

    Uninstall

    claude-notify-uninstall
    npm uninstall -g claude-notification-plugin

    License

    MIT