
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cat-ccnotify-hook
Advanced tools
Enhanced Claude Code notification hooks with cat sounds and better styling - replaces claude-code-notify-mcp
Enhanced Claude Code notification hooks with adorable cat sounds and better styling for macOS.
# Install globally
npm install -g cat-ccnotify-hook
# Run the installer
cat-ccnotify-install
This will automatically:
~/.claude directory if needed~/.claude/settings.json with the correct hook configuration⚠️ Important: After installation, reload Claude Code hooks:
/hooks in Claude CodeESC immediatelyClone this repository:
git clone https://github.com/cat-ccnotify/cat-ccnotify-hook.git
cd cat-ccnotify-hook
Install dependencies:
npm install
Run the installer:
npm run install-hooks
Test your installation to make sure everything works:
# Simple notification test (recommended)
cat-notify
# Custom notification
cat-notify "My Title" "My custom message"
# Test actual hook functionality with Claude Code data format
cat-notify --notification-hook
cat-notify --stop-hook
# Test hooks via npm command
cat-ccnotify-test
# Or manually test hooks
node hooks/notification-hook.js
echo '{"title":"Test","message":"Session ended"}' | node hooks/stop-hook.cjs
You should see notifications with:
All notifications play the same adorable cat meow sound! 🐱
The system intelligently analyzes your notification content and automatically adds appropriate emojis:
complete, success, passed, done, deployed, publishederror, failed, crash, exception, cannot, invalidwarning, deprecated, caution, should, mightrunning, processing, installing, building, loadingcommit, push, pull, merge, branch, repositorybuild, compile, bundle, webpack, typescripttest, spec, jest, coverage, assertiondeploy, release, production, staging, livenpm, yarn, package, dependency, installfile, directory, write, read, created, modifiedInstead of showing generic messages, you'll see your actual notification content:
Note: All categories use the same adorable cat meow sound. Future versions may include category-specific sounds!
The hooks are automatically configured in ~/.claude/settings.json. You can view the current configuration:
cat ~/.claude/settings.json | jq '.hooks'
The hooks are configured in the new Claude Code format:
{
"hooks": {
"Notification": [
{
"type": "command",
"command": "node /path/to/notification-hook.js",
"description": "Cat-themed notification with meow sound"
}
],
"Stop": [
{
"type": "command",
"command": "node /path/to/stop-hook.cjs",
"description": "Cat-themed session end notification"
}
]
}
}
After installation or making manual changes:
/hooks in Claude CodeESC immediately to reload settingsYou can customize the notification behavior with these environment variables:
# Force console output (echo) instead of system notifications
export CAT_CCNOTIFY_FORCE_CONSOLE=true
# Enable debug logging
export CAT_CCNOTIFY_DEBUG=true
🤖 Automatic Environment Detection: The system automatically detects when to use console output in these scenarios:
SSH_CONNECTION without DISPLAY)Examples:
# SSH connection - automatically uses console output
ssh user@server
claude-code # → 🐱 Console notifications
# CI environment - automatically uses console output
# GitHub Actions, GitLab CI, etc.
claude-code # → 🐱 Console notifications
# Pipe usage - automatically uses console output
claude-code | tee output.log # → 🐱 Console notifications
# Normal desktop usage - uses GUI notifications
claude-code # → Native macOS notifications + sound
Manual override (rarely needed):
# Force console output even in GUI environments
export CAT_CCNOTIFY_FORCE_CONSOLE=true
# Or temporarily
CAT_CCNOTIFY_FORCE_CONSOLE=true claude-code
Priority order:
CAT_CCNOTIFY_FORCE_CONSOLE=true (manual override)cat-ccnotify-hook/
├── package.json # Package configuration and npm scripts
├── README.md # This documentation
├── INSTALL.md # Detailed installation guide
├── PUBLISHING.md # npm publishing instructions
├── jest.config.js # Test configuration
├── .npmignore # npm package exclusions
├── bin/
│ └── cat-notify # Command line testing tool
├── hooks/ # Core hook implementations
│ ├── notification-hook.js # Smart notification processor
│ ├── stop-hook.cjs # Session end handler
│ └── hooks.json # Hook configuration template
├── lib/ # Shared utilities
│ ├── shell-executor.js # Secure command execution (ES)
│ ├── shell-executor.cjs # Secure command execution (CJS)
│ ├── error-handler.js # Comprehensive error handling (ES)
│ └── error-handler.cjs # Comprehensive error handling (CJS)
├── sounds/ # Audio assets
│ └── cat-meow-1-fx-323465.mp3 # Adorable cat meow sound
├── scripts/ # Management tools
│ ├── install-hooks.js # Intelligent installer
│ ├── uninstall-hooks.js # Clean uninstaller
│ └── test-hooks.js # Manual testing utility
└── test/ # Test suite
├── unit/ # Unit tests
│ ├── shell-executor.test.js # Shell execution tests
│ └── error-handler.test.js # Error handling tests
└── e2e/ # End-to-end tests
└── notification-flow.test.js # Full workflow tests
hooks/notification-hook.js: Main notification processor with smart categorizationhooks/stop-hook.cjs: Handles Claude Code session terminationlib/shell-executor.js: Secure execution of macOS commandslib/error-handler.js: Comprehensive error handling and loggingscripts/install-hooks.js: Automatic hook configuration setuptest/: Complete test suite with unit and E2E tests# Test hooks with different notification types
node hooks/notification-hook.js "Tests Passed" "All 25 tests completed successfully!"
node hooks/notification-hook.js "Build Failed" "TypeScript compilation errors found"
node hooks/notification-hook.js "Git Push" "Successfully pushed to origin/main"
# Test with JSON input
echo '{"title":"Deploy Complete","message":"Application deployed to production"}' | node hooks/notification-hook.js
# Test stop hook
echo '{"title":"Session Ended","message":"Claude Code session terminated"}' | node hooks/stop-hook.cjs
# Run test suite
npm test
npm run test:unit
npm run test:e2e
# Test with debug mode
CAT_CCNOTIFY_DEBUG=true node hooks/notification-hook.js "Debug Test" "Testing with detailed logging"
sounds/ directory (supported: .mp3, .wav, .m4a, .aiff, .aac)sendEnhancedNotification functionafplay sounds/your-new-sound.mp3npm testenhanceNotificationStyle() functionanalyzeNotificationContent() function# If installed via npm:
cat-ccnotify-uninstall
# If installed locally:
cd /path/to/cat-ccnotify-hook
npm run uninstall-hooks
# Or manually edit ~/.claude/settings.json to remove the notification and stop hook entries
This will restore Claude Code to use default notifications.
CLAUDE_NOTIFICATION, NOTIFICATION_TITLE)osascriptafplayThe hook intelligently handles various input formats:
// JSON format
{"title":"Build Complete","message":"Compilation successful"}
// Plain text
"Tests passed - 25/25 successful"
// Multi-line
"Git Push Failed\nPermission denied to repository"
// Command args
node notification-hook.js "Title" "Message"
For troubleshooting, enable debug mode to see comprehensive logging:
# Enable debug mode for a single test
CAT_CCNOTIFY_DEBUG=true node hooks/notification-hook.js "Debug Test" "Testing notification"
# Set globally for your session
export CAT_CCNOTIFY_DEBUG=true
# View debug logs
tail -f ~/.claude/cat-ccnotify/notification-hook.log
tail -f ~/.claude/cat-ccnotify/stop-hook.log
# View recent debug activity
tail -20 ~/.claude/cat-ccnotify/notification-hook.log
=== Debug Information ===
Process arguments: ["node", "/path/to/notification-hook.js", "Tests Passed", "All tests successful"]
Env CLAUDECODE: "1"
Using command line arguments: ["Tests Passed", "All tests successful"]
=== Final Result ===
Title: "Tests Passed"
Message: "All tests successful"
Level: "info"
Analyzed notification type: success
Enhanced notification - Title: "✅ Tests Passed", Message: "All tests successful"
ls sounds/cat-meow-1-fx-323465.mp3afplay sounds/cat-meow-1-fx-323465.mp3osascript -e 'display notification "Test" with title "Test"'cat ~/.claude/settings.json | grep -A 20 hooksVerify installation:
which claude
cat ~/.claude/settings.json | grep hooks
Reload hooks: Type /hooks in Claude Code, then press ESC
Enable debug mode:
export CAT_CCNOTIFY_DEBUG=true
# Test a notification to generate logs
echo '{"title":"Debug","message":"Test"}' | node hooks/notification-hook.js
# Check logs
tail -f ~/.claude/cat-ccnotify/notification-hook.log
Check file permissions: ls -la ~/.claude/settings.json
Verify hook paths: Ensure the paths in settings.json point to existing files
chmod +x hooks/*.jsIssue: Clicking on notifications may open the script file in your default editor.
Why this happens: macOS associates notifications with their source. When sent from a script, clicking the notification opens that script.
Solutions:
Ignore the behavior: The notification functionality works perfectly; you can simply ignore clicking on them.
Install terminal-notifier (recommended):
# Install via Homebrew
brew install terminal-notifier
# The hooks will automatically use it if available
Change default app for .js files:
Disable notification clicking:
Note: This is a macOS system behavior, not a bug in cat-ccnotify-hook. The notifications work correctly; the click behavior is just a side effect of how macOS handles script-generated notifications.
# Enable debug mode
export CAT_CCNOTIFY_DEBUG=true
# Or set it permanently in your shell profile
echo 'export CAT_CCNOTIFY_DEBUG=true' >> ~/.zshrc
# View logs (only created when debug mode is enabled)
tail -f ~/.claude/cat-ccnotify/notification-hook.log
tail -f ~/.claude/cat-ccnotify/stop-hook.log
# View all cat-ccnotify logs
tail -f ~/.claude/cat-ccnotify/*.log
afplay and osascript)MIT License - see LICENSE file for details.
Made with 💝 and 🐱 for Claude Code users who love cats!
FAQs
Enhanced Claude Code notification hooks with cat sounds and better styling - replaces claude-code-notify-mcp
We found that cat-ccnotify-hook demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.