- Notifications
You must be signed in to change notification settings - Fork5
rinadelph/Rapala
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Universal Claude Code hooks collection with cross-platform installer
🤖Interested in AI Multi-Agent workflows? Join theSwarm Community to discuss agentic development, share tools, and collaborate on building better AI workflows!
Works universally across all devices and operating systems:
- ✅Windows (10, 11) - Native PowerShell integration
- ✅macOS (Intel & Apple Silicon) - Native osascript notifications
- ✅Linux (Ubuntu, CentOS, Arch) - Native notify-send support
- ✅Node.js 16+ - Tested on LTS versions
Install globally with npm:
npm install -g rins_hooks
Install hooks interactively:
rins_hooks install --interactive
Or install specific hooks:
rins_hooks install auto-commit code-formatter notification
Automatically commits file changes with contextual messages after every Claude Code file modification.
Features:
- Smart commit messages with tool context
- File path and change type detection
- Configurable exclusion patterns
- Branch-aware behavior
Automatically formats code after file modifications using popular formatters.
Features:
- Support for multiple languages (JS/TS, Python, Go, Rust, Java, C/C++)
- Project configuration detection
- Configurable formatters per file type
- Graceful error handling
Enhanced notifications for Claude Code events with multiple delivery methods.
Features:
- Cross-platform desktop notifications
- Slack/Discord/Teams integration
- Custom notification commands
- Configurable notification types
Install for all Claude Code projects:
rins_hooks install auto-commit --user
Install for current project only:
rins_hooks install auto-commit --project
Install locally (not committed to git):
rins_hooks install auto-commit --local
# Interactive installationrins_hooks install --interactive# Install specific hooksrins_hooks install auto-commit notification# Install all hooksrins_hooks install --all# Dry run (preview changes)rins_hooks install auto-commit --dry-run
# List available hooksrins_hooks list# Show installation statusrins_hooks status# Show configurationrins_hooks config --show# Validate configurationrins_hooks config --validate# Run diagnosticsrins_hooks doctor
# Uninstall specific hooksrins_hooks uninstall auto-commit# Uninstall all hooksrins_hooks uninstall --all
The auto-commit hook can be customized through its configuration:
{"commitMessageTemplate":"Auto-commit: {{toolName}} modified {{fileName}}\\n\\n- File: {{filePath}}\\n- Tool: {{toolName}}\\n- Session: {{sessionId}}\\n\\n🤖 Generated with Claude Code via rins_hooks\\nCo-Authored-By: Claude <noreply@anthropic.com>","excludePatterns": ["*.log","*.tmp",".env*","*.key","node_modules/**",".git/**" ],"skipEmptyCommits":true,"branchRestrictions": ["main","master"],"maxCommitMessageLength":500}
Configure formatters for different file types:
{"formatters": {".js":"prettier --write",".py":"black",".go":"gofmt -w",".rs":"rustfmt" },"excludePatterns": ["node_modules/**","dist/**"],"failOnError":false}
Set up notifications and integrations:
{"desktopNotifications":true,"integrations": {"slack": {"enabled":true,"webhook":"https://hooks.slack.com/...","channel":"#dev" },"discord": {"enabled":true,"webhook":"https://discord.com/api/webhooks/..." } }}
- Node.js: >= 16.0.0
- Claude Code: Latest version
- Git: For auto-commit functionality
- Formatters: Optional, based on enabled hooks
Run the built-in diagnostics to check your setup:
rins_hooks doctor
This will check:
- ✅ Node.js version compatibility
- ✅ Claude Code installation
- ✅ Git availability and repository status
- ✅ Settings directory permissions
- ✅ Configuration file validity
~/.claude/ # Claude Code settings directory├── settings.json # User-level hooks└── projects/ └── your-project/ └── .claude/ ├── settings.json # Project-level hooks └── settings.local.json # Local hooks (not committed)
- Hooks execute with your user permissions
- Review hook configurations before installation
- Use project-level installation for team settings
- Keep sensitive configurations in local settings
- Regularly update to latest versions
Hook not executing:
# Check installation statusrins_hooks status# Validate configurationrins_hooks config --validate# Run diagnosticsrins_hooks doctor
Permission errors:
- Ensure Claude Code settings directory is writable
- Check file permissions on hook scripts
- Verify git repository permissions for auto-commit
Formatter not found:
- Install required formatters globally
- Check PATH configuration
- Use
rins_hooks doctor
to verify dependencies
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch
- Add your hook or improvement
- Test thoroughly across platforms
- Submit a pull request
Extend theHookBase
class:
constHookBase=require('rins_hooks/src/hook-base');classMyCustomHookextendsHookBase{constructor(config={}){super('my-custom-hook',config);}asyncexecute(input){// Your hook logic herereturnthis.success({message:'Hook executed successfully'});}}
MIT License - seeLICENSE file for details.
- Anthropic for Claude Code
- Open source community for formatter tools
- Contributors and testers
Made with ❤️ for the Claude Code community
About
rins_hooks - Never lose track of your Claude Code changes again. Automatically commits every edit with context, so you can code fearlessly and revert easily.
Resources
Uh oh!
There was an error while loading.Please reload this page.