# claude-notification-installer **Repository Path**: forwardxiang_admin/claude-notification-installer ## Basic Information - **Project Name**: claude-notification-installer - **Description**: Claude Code 任务完成通知系统 - 一键安装 curl ... | bash - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: https://gitee.com/forwardxiang_admin/claude-notification-installer#readme - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-06 - **Last Updated**: 2026-05-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Claude Code Task Completion Notification Claude Code 任务完成通知系统 - 支持 Hook Event 按类型控制通知 ## 功能特性 ✅ **Hook Event 过滤** - 按事件类型(stop/ask/plan/idle)独立控制通知 ✅ **邮件通知** - SMTP 支持,兼容 163.com、QQ、Gmail 等 ✅ **飞书通知** - 支持内网 MCP 服务器集成 ✅ **声音通知** - macOS afplay / Windows PowerShell ✅ **弹出通知** - Windows Toast / macOS 通知中心 ✅ **跨平台** - Linux / macOS / Windows 全支持 ## 一键安装 ### macOS / Linux(一行命令) ```bash # 安装 curl -fsSL https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.sh | bash # 卸载 curl -fsSL https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.sh | bash -s uninstall # 更新 curl -fsSL https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.sh | bash -s update ``` ### Windows(一行命令) ```powershell # 安装 irm https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.ps1 | iex # 卸载 irm https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.ps1 | iex; uninstall # 更新 irm https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.ps1 | iex; update ``` ## 配置 安装后编辑配置文件: ### macOS / Linux ```bash vim ~/.claude/hooks/claude-notification/config.json ``` ### Windows ```powershell notepad $env:USERPROFILE\.claude\hooks\claude-notification\config.json ``` ### 配置示例 ```json { "staffEmail": "your-email@example.com", "soundEnabled": true, "notificationEnabled": false, "popupEnabled": false, "emailEnabled": true, "emailSmtpHost": "smtp.163.com", "emailSmtpPort": 465, "emailTo": "your-qq@qq.com", "emailFrom": "your-163@163.com", "emailUsername": "your-163@163.com", "emailAuthCode": "your-smtp-auth-code", "emailSubject": "Claude Code 任务完成通知", "hookEventNotifications": { "ask": true, "plan": true, "idle": false, "stop": true } } ``` ### Hook Event 说明 | 事件 | 说明 | 默认 | |------|------|------| | `stop` | Claude 任务完成 | ✓ true | | `ask` | 等待用户选择/输入 | ✓ true | | `plan` | 方案生成等待审批 | ✓ true | | `idle` | 空闲等待输入 | ✗ false | ## 测试 ### macOS / Linux ```bash # 测试配置 bash ~/.claude/hooks/claude-notification/test-config.sh # 测试邮件发送 bash ~/.claude/hooks/claude-notification/debug.sh # E2E 测试 bash ~/.claude/hooks/claude-notification/test-e2e.sh ``` ### Windows PowerShell ```powershell # 测试配置 powershell -ExecutionPolicy Bypass -File $env:USERPROFILE\.claude\hooks\claude-notification\test-config.ps1 # 测试邮件发送 powershell -ExecutionPolicy Bypass -File $env:USERPROFILE\.claude\hooks\claude-notification\debug.ps1 ``` ## 详细文档 - [配置说明](CONFIG.md) - [调试指南](DEBUG.md) - [完整测试报告](TEST_REPORT.md) ## 文件结构 ``` ~/.claude/hooks/claude-notification/ ├── install.sh # Unix 本地安装脚本 ├── install.ps1 # Windows 本地安装脚本 ├── install-remote.sh # Unix 远程一键安装 ├── install-remote.ps1 # Windows 远程一键安装 ├── notify.sh # 飞书通知 ├── play-sound.sh # 声音播放 ├── email-notify.py # 邮件通知 ├── debug.sh / debug.ps1 # 调试脚本 ├── test-config.sh / ps1 # 配置测试 ├── test-e2e.sh # E2E 测试 ├── config.json # 用户配置 ├── config.json.example # 配置示例 ├── CONFIG.md # 配置文档 ├── README.md # 本文件 ├── DEBUG.md # 调试指南 ├── TEST_REPORT.md # 测试报告 ├── notification.wav # 声音文件(Windows) └── notification.aiff # 声音文件(macOS) ``` ## 卸载 ```bash # macOS / Linux curl -fsSL https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.sh | bash -s uninstall # Windows PowerShell irm https://gitee.com/forwardxiang_admin/claude-notification-installer/raw/master/install-remote.ps1 | iex; uninstall ``` ## 仓库地址 - Gitee: https://gitee.com/forwardxiang_admin/claude-notification-installer ## 许可证 MIT License