页面 · Claude Notifications
Notify setup
Interactive setup — walks through enabling notification channels and writes ~/.claude-notifications/config.json
Set up notification channels for the first time, or add a new one.
Argument: $ARGUMENTS — optional channel to focus on (slack, discord, email, whatsapp, desktop, webpush, webhook). If omitted, ask which the user wants to enable.
Steps
-
Ensure config exists with sensible defaults if missing:
bash -
For the requested channel, ask the user only the questions you can't answer yourself. Don't ask for things you already know:
slack→ just the webhook URL (channel & username have sensible defaults)discord→ just the webhook URLemail(Gmail) → email address + app password (link them to https://myaccount.google.com/apppasswords)whatsapp(CallMeBot) → phone number + apikey (tell them how to get one: text "I allow callmebot to send me messages" to +34 644 51 95 23)whatsapp(Twilio) → SID, token, from-number, to-number(s)desktop→ enable, ask whether they want voice (default no), and if yes which voicewebpush(ntfy) → suggest a unique topic name likeclaude-<user>-<random>and tell them to install ntfy on their phone and subscribe to the topicwebpush(pushover) → user_key + app_tokenwebhook→ URL + optional secret
-
Merge into config with
jq, never overwrite the whole file. Example for slack:bash -
Test immediately by firing through that channel only:
bash -
Verify by checking the log for failures and asking the user "did you receive it?"
Defaults to use
- New channels start with
events: ["notification","stop"]. Never default to["*"]—pre-toolandpost-toolfire dozens of times per turn. - Always keep
enabled: falsechannels intact rather than deleting them.
When done
Confirm with one line: which channel was wired, where the config lives, and how to add more (/notify-setup <other-channel>).