cc-hooks
husniadil · husniadil/cc-hooks
cc-hooks thêm phản hồi âm thanh thông minh, thông báo TTS đa ngôn ngữ và tin nhắn AI theo ngữ cảnh vào Claude Code để nâng cao trải nghiệm lập trình.
Plugin phản hồi âm thanh cho Claude Code với các thông báo TTS, hiệu ứng âm thanh và tin nhắn AI theo ngữ cảnh. Hỗ trợ nhiều nhà cung cấp và ngôn ngữ.
Xem trước
Bạn có thể làm gì với nó
- Nhận thông báo âm thanh khi Claude Code bắt đầu hoặc hoàn thành một tác vụ.
- Nhận phản hồi bằng giọng nói theo ngữ cảnh về việc triển khai và tiến độ mã.
- Tùy chỉnh hiệu ứng âm thanh và nhà cung cấp TTS cho môi trường lập trình cá nhân hóa.
Kiểm tra an toàn
Không thấy dấu hiệu rủi ro trong các file đã quét.
Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.
Trích từ README
cc-hooks
Give Claude Code a voice! Transform your coding experience with intelligent audio feedback, multilingual TTS announcements, and AI-powered contextual messages.
Why cc-hooks?
Working with Claude Code is powerful, but it can feel silent and disconnected. cc-hooks brings your coding sessions to life:
- 🎯 Stay in the flow - Audio cues keep you informed without breaking focus
- 🔊 Instant feedback - Know when tools start, complete, or when Claude needs your attention
- 🗣️ Smart announcements - Context-aware messages that understand what you're working on
- 🌍 Your language - TTS support for multiple languages (English, Indonesian, Spanish, and more)
- ⚡ Zero config - Works out of the box, customize when you need it
- 🎛️ Flexible control - From complete silence to premium AI voices, you choose
Quick Demo
Watch cc-hooks in action with premium ElevenLabs text-to-speech
Features
🎵 Audio Feedback System
- Sound effects for different events (tool execution, notifications, completions)
- Voice announcements for session lifecycle and task completions
- Multiple TTS providers: Prerecorded sounds (offline), Google TTS (free), ElevenLabs (premium)
- Smart fallback chain - automatically tries next provider if one fails
🤖 AI-Powered Intelligence (Optional)
- Contextual completion messages - "I've successfully implemented the authentication system you requested"
- Smart tool announcements - Understands what Claude is doing and why
- Automatic translation - AI messages in your preferred language
- Cost optimized - Disabled by default, enable per session when needed
⚙️ Advanced Capabilities
- Multi-instance support - Run multiple Claude sessions with different audio configs
- Granular silent modes - Disable just announcements or just sound effects
- Per-session configuration - Change settings without editing config files
- Auto-cleanup - Smart session management prevents resource leaks
- Status line integration - See current session info in Claude Code UI
Installation
Choose Your Installation Mode
| Feature | Plugin Mode ⭐ Recommended | Standalone Mode |
|---|---|---|
| Setup Complexity | ✅ Simple (3 commands) | ⚠️ Manual hooks configuration |
| Updates | ✅ One command | ⚠️ Git pull + restart |
| Slash Commands | ✅ Built-in | ❌ Not available |
| Hooks Config | ✅ Automatic | ⚠️ Manual (settings.json) |
| Installation Path | Fixed location | ✅ User-defined |
| For Contributors | ⚠️ Limited | ✅ Full source access |
| Recommended for | Most users | Developers, testers |
→ Continue with Plugin Installation | → Standalone Installation
Plugin Installation (Recommended)
Prerequisites
- Python 3.12+ (recommended: 3.12.7)
- uv package manager
- Claude Code CLI installed
Quick Install
Option 1: CLI (Recommended - No REPL needed)
# Add marketplace
claude plugin marketplace add https://github.com/husniadil/cc-hooks.git
# Install plugin
claude plugin install cc-hooks-plugin@cc-hooks-plugin
# Done! Start Claude to use
claude
Option 2: Inside Claude REPL
# Start Claude first
claude
# Then in the REPL:
/plugin marketplace add https://github.com/husniadil/cc-hooks.git
/plugin install cc-hooks-plugin@cc-hooks-plugin
# Restart Claude Code
Start using! Audio feedback works immediately with default prerecorded sounds. 🎉
Post-Installation Setup (Recommended)
After installation, use the interactive setup wizard:
# Inside Claude REPL
/cc-hooks-plugin:setup
This wizard helps you:
- ✅ Check system requirements (uv installation)
- ✅ Set up convenient shell aliases (
cldcommand) - ✅ Configure status line
- ✅ Set up API keys for premium features
- ✅ Choose preset configurations
- ✅ Test your installation
Quick setup modes:
/cc-hooks-plugin:setup check # Check requirements and config only
/cc-hooks-plugin:setup apikeys # Focus on API key setup
/cc-hooks-plugin:setup test # Run installation tests
Status Line Setup (Optional)
The plugin includes a status line feature that shows session info in Claude Code UI. This is not
configured automatically and requires manual setup in ~/.claude/settings.json:
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
// ...
"statusLine": {
"type": "command",
"command": "uv run ~/.claude/plugins/marketplaces/cc-hooks-plugin/status-lines/status_line.py"
}
}
Benefits:
- Shows current TTS provider, language, and AI mode
- Displays session info at a glance
- Real-time status updates
Usage
Quick Start
Automated Setup (Easiest):
# Inside Claude REPL
/cc-hooks-plugin:setup
Manual Setup:
Add shell alias to your .bashrc or .zshrc:
alias cld='~/.claude/plugins/marketplaces/cc-hooks-plugin/claude.sh'
Then reload: source ~/.bashrc or source ~/.zshrc
Usage Examples
# Default: prerecorded sounds (offline, no config needed)
cld
# Google TTS in Indonesian
cld --audio=gtts --language=id
# Premium ElevenLabs voice
cld --audio=elevenlabs
# With AI-powered contextual messages
cld --audio=gtts --ai=full --language=id
# Silent mode for meetings
cld --silent
Configuration
CLI Flags Reference
Audio Providers
cld --audio=prerecorded # Offline sounds (default, no API key)
cld --audio=gtts # Google TTS (free, requires internet)
cld --audio=elevenlabs # Premium quality (requires API key)
| Pro