Skip to content

Commit 24bea54

Browse files
committed
πŸ—‘οΈ Remove Telegram Notifications Setup Guide from documentation
1 parent e7ba2c5 commit 24bea54

File tree

2 files changed

+0
-151
lines changed

2 files changed

+0
-151
lines changed

β€Žcli-tool/components/hooks/automation/TELEGRAM_SETUP.mdβ€Ž

Lines changed: 0 additions & 143 deletions
This file was deleted.

β€Ždocs/components.jsonβ€Ž

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,14 +2368,6 @@
23682368
}
23692369
],
23702370
"hooks": [
2371-
{
2372-
"name": "TELEGRAM_SETUP",
2373-
"path": "automation/TELEGRAM_SETUP.md",
2374-
"category": "automation",
2375-
"type": "hook",
2376-
"content": "# πŸ“± Telegram Notifications Setup Guide\n\n## Overview\nGet real-time Telegram notifications when Claude Code finishes working, encounters long operations, or needs attention.\n\n## Available Hooks\n\n### 1. `telegram-notifications` - Basic Notifications\n- βœ… Notifies when main Claude Code session ends\n- 🎯 Notifies when subagent tasks complete\n- Simple timestamp information\n\n### 2. `telegram-detailed-notifications` - Advanced Session Tracking\n- πŸš€ Session start notifications\n- βœ… Detailed completion notifications with duration\n- πŸ’Ύ Memory usage information\n- πŸ“ Project name tracking\n\n### 3. `telegram-error-notifications` - Productivity Monitoring\n- ⚠️ Alerts for long-running Bash operations (>30 seconds)\n- πŸ”” Notifications when Claude Code waits for user input\n- Helps catch stuck processes\n\n## Setup Instructions\n\n### Step 1: Create a Telegram Bot\n1. Message [@BotFather](https://t.me/BotFather) on Telegram\n2. Send `/newbot` command\n3. Follow instructions to create your bot\n4. Copy the **Bot Token** (looks like: `123456789:ABCD-EFGHijklmnop_qrstuvwxyz`)\n\n### Step 2: Get Your Chat ID\n1. Start a conversation with your bot\n2. Send any message to the bot\n3. Visit: `https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates`\n4. Find your **Chat ID** in the response (usually a number like `123456789`)\n\n### Step 3: Set Environment Variables\n\n#### Option A: Global Configuration (Recommended)\nAdd to your shell profile (`.bashrc`, `.zshrc`, or `.profile`):\n\n```bash\nexport TELEGRAM_BOT_TOKEN=\"123456789:ABCD-EFGHijklmnop_qrstuvwxyz\"\nexport TELEGRAM_CHAT_ID=\"123456789\"\n```\n\n#### Option B: Project-Specific Configuration\nAdd to your project's `.env` file or `.claude/settings.local.json`:\n\n```json\n{\n \"env\": {\n \"TELEGRAM_BOT_TOKEN\": \"123456789:ABCD-EFGHijklmnop_qrstuvwxyz\",\n \"TELEGRAM_CHAT_ID\": \"123456789\"\n }\n}\n```\n\n### Step 4: Install the Hook\n```bash\n# Basic notifications\nnpx claude-code-templates@latest --hook=automation/telegram-notifications\n\n# Detailed session tracking\nnpx claude-code-templates@latest --hook=automation/telegram-detailed-notifications\n\n# Productivity monitoring\nnpx claude-code-templates@latest --hook=automation/telegram-error-notifications\n```\n\n## Testing\nAfter setup, test the hook by running:\n```bash\n# This should trigger a notification when the command completes\necho \"Test complete\"\n```\n\n## Security Notes\n- ⚠️ **Never commit bot tokens to version control**\n- πŸ”’ Use `.claude/settings.local.json` for sensitive credentials\n- 🏒 For teams, consider using enterprise managed settings\n- πŸ” Regularly rotate bot tokens for security\n\n## Troubleshooting\n\n### No notifications received?\n1. Verify environment variables: `echo $TELEGRAM_BOT_TOKEN`\n2. Check bot token format (should contain `:`)\n3. Ensure you've messaged the bot first\n4. Verify chat ID is correct (numeric)\n\n### Bot responds with \"Forbidden\"?\n- The chat ID might be incorrect\n- You need to start a conversation with the bot first\n\n### Hook not triggering?\n- Verify hook is installed: check `.claude/settings.json`\n- Test with a simple command first\n- Check Claude Code version compatibility\n\n## Message Examples\n\n### Basic Notification\n```\nπŸ€– Claude Code finished working at 2025-01-15 14:30:45\n```\n\n### Detailed Notification\n```\nβœ… Claude Code Session Completed\nπŸ“ Project: my-awesome-project\n⏱️ Duration: 15m 32s\nπŸ’Ύ Memory Used: 245MB\n⏰ Finished: 14:30:45\nπŸ“… Date: 2025-01-15\n```\n\n### Long Operation Alert\n```\n⚠️ Long Bash Operation\n⏱️ Duration: 2m 15s\nπŸ“ Project: data-processing\n⏰ Time: 14:28:30\n```\n\n## Advanced Configuration\n\n### Custom Message Format\nYou can modify the hooks to customize message format:\n- Edit the `MESSAGE` variable in the hook command\n- Use HTML formatting with `parse_mode=HTML`\n- Add emojis and custom text\n\n### Group Notifications\n- Add the bot to a Telegram group\n- Use the group chat ID instead of personal chat ID\n- Perfect for team notifications\n\n### Multiple Projects\n- Use different bots for different projects\n- Set project-specific environment variables\n- Configure in `.claude/settings.local.json` per project",
2377-
"description": ""
2378-
},
23792371
{
23802372
"name": "build-on-change",
23812373
"path": "automation/build-on-change.json",

0 commit comments

Comments
Β (0)