Claude Code Telegram Notifier Plugin
npx claudepluginhub kairos03/telegram-notifierSend Telegram notifications for Claude Code Stop and Notification hooks
Claude Code의 Stop 및 Notification hook에서 텔레그램으로 알림을 보내는 플러그인입니다.
/plugin install kairos9603/telegram-notifier
또는 CLI에서:
claude plugin install kairos9603/telegram-notifier
플러그인 설치 후 환경 변수 설정만 하면 바로 사용 가능합니다.
# jq 설치 (Ubuntu/Debian)
sudo apt-get install jq
# jq 설치 (macOS)
brew install jq
/newbot 명령어로 새 봇 생성1234567890:ABCdefGHIjklMNOpqrsTUVwxyz)https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
chat.id 값 확인~/.bashrc, ~/.zshrc 또는 ~/.profile에 다음 추가:
# Telegram Notifier for Claude Code
export TELEGRAM_BOT_TOKEN="your_bot_token_here"
export TELEGRAM_CHAT_ID="your_chat_id_here"
저장 후 터미널 재시작 또는:
source ~/.bashrc # or ~/.zshrc, ~/.profile
플러그인은 자동으로 설치되며, shell 스크립트가 실행됩니다. 별도 빌드 과정이 필요하지 않습니다.
Hook은 다음 경로에서 자동으로 실행됩니다:
hooks/stop.shhooks/notification.sh⏸️ Claude Code 정지
📁 project-name
타입: stop
내용: Claude Code stopped
🔔 Claude Code 알림
📁 project-name
타입: idle_prompt
내용: Claude is waiting for your input
Hook 테스트:
# Stop hook 테스트
echo '{"type":"stop","projectPath":"/home/user/project","content":"Test stop"}' | \
bash ~/.claude/plugins/cache/telegram-notifier-marketplace/telegram-notifier/1.1.0/hooks/stop.sh
# Notification hook 테스트
echo '{"type":"idle_prompt","projectPath":"/home/user/project","content":"Test notification"}' | \
bash ~/.claude/plugins/cache/telegram-notifier-marketplace/telegram-notifier/1.1.0/hooks/notification.sh
환경 변수가 올바르게 설정되었는지 확인:
echo $TELEGRAM_BOT_TOKEN
echo $TELEGRAM_CHAT_ID
Bot Token과 Chat ID가 올바른지 확인
봇이 차단되지 않았는지 확인
jq 설치 확인 (선택사항):
jq --version
shell 스크립트 실행 권한 확인:
chmod +x ~/.claude/plugins/cache/telegram-notifier-marketplace/telegram-notifier/1.1.0/hooks/*.sh
bash와 curl 설치 확인:
bash --version
curl --version
# 로컬 디렉토리에서 플러그인 테스트
claude --plugin-dir /data/develop/telegram-notifier
# 플러그인 구조 검증
claude plugin validate /data/develop/telegram-notifier
# Hook 스크립트 직접 테스트
echo '{"type":"stop","projectPath":"'$(pwd)'","content":"Test"}' | \
bash ./hooks/stop.sh
telegram-notifier/
├── .claude-plugin/
│ ├── plugin.json # 플러그인 매니페스트
│ └── marketplace.json # Marketplace 설정
├── hooks/
│ ├── hooks.json # Hook 설정
│ ├── stop.sh # Stop hook shell script
│ └── notification.sh # Notification hook shell script
├── src/ # TypeScript 소스 (레거시)
├── README.md
├── LICENSE
└── package.json
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/kairos9603/telegram-notifier.git
git push -u origin main
git tag v1.0.0
git push origin v1.0.0
배포 후 사용자는 /plugin install kairos9603/telegram-notifier로 설치 가능합니다.
MIT