{"id":29806261,"url":"https://github.com/rinadelph/rins_hooks","last_synced_at":"2025-07-28T14:07:57.101Z","repository":{"id":303037146,"uuid":"1014213140","full_name":"rinadelph/rins_hooks","owner":"rinadelph","description":"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.","archived":false,"fork":false,"pushed_at":"2025-07-22T00:37:41.000Z","size":310,"stargazers_count":63,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T02:35:42.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rinadelph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-05T09:14:03.000Z","updated_at":"2025-07-21T19:45:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0d64ae7-49d0-44ff-971e-5a86e80ae57b","html_url":"https://github.com/rinadelph/rins_hooks","commit_stats":null,"previous_names":["rinadelph/rins_hooks"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rinadelph/rins_hooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinadelph%2Frins_hooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinadelph%2Frins_hooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinadelph%2Frins_hooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinadelph%2Frins_hooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rinadelph","download_url":"https://codeload.github.com/rinadelph/rins_hooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinadelph%2Frins_hooks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267527835,"owners_count":24102019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-28T14:05:55.295Z","updated_at":"2025-07-28T14:07:57.092Z","avatar_url":"https://github.com/rinadelph.png","language":"JavaScript","funding_links":[],"categories":["Tools \u0026 Utilities"],"sub_categories":[],"readme":"# rins_hooks\n\nUniversal Claude Code hooks collection with cross-platform installer\n\n\u003e 🤖 **Interested in AI Multi-Agent workflows?** Join the [Swarm Community](https://discord.gg/7Jm7nrhjGn) to discuss agentic development, share tools, and collaborate on building better AI workflows!\n\n## 🌐 Cross-Platform Support\n\nWorks universally across all devices and operating systems:\n- ✅ **Windows** (10, 11) - Native PowerShell integration\n- ✅ **macOS** (Intel \u0026 Apple Silicon) - Native osascript notifications  \n- ✅ **Linux** (Ubuntu, CentOS, Arch) - Native notify-send support\n- ✅ **Node.js** 16+ - Tested on LTS versions\n\n## 🚀 Quick Start\n\nInstall globally with npm:\n\n```bash\nnpm install -g rins_hooks\n```\n\nInstall hooks interactively:\n\n```bash\nrins_hooks install --interactive\n```\n\nOr install specific hooks:\n\n```bash\nrins_hooks install auto-commit code-formatter notification\n```\n\n## 📋 Available Hooks\n\n### 🔄 Auto-Commit Hook\nAutomatically commits file changes with contextual messages after every Claude Code file modification.\n\n**Features:**\n- Smart commit messages with tool context\n- File path and change type detection\n- Configurable exclusion patterns\n- Branch-aware behavior\n\n### 🎨 Code Formatter Hook\nAutomatically formats code after file modifications using popular formatters.\n\n**Features:**\n- Support for multiple languages (JS/TS, Python, Go, Rust, Java, C/C++)\n- Project configuration detection\n- Configurable formatters per file type\n- Graceful error handling\n\n### 🔔 Notification Hook\nEnhanced notifications for Claude Code events with multiple delivery methods.\n\n**Features:**\n- Cross-platform desktop notifications\n- Slack/Discord/Teams integration\n- Custom notification commands\n- Configurable notification types\n\n## 📖 Installation Options\n\n### Global Installation (Recommended)\nInstall for all Claude Code projects:\n```bash\nrins_hooks install auto-commit --user\n```\n\n### Project Installation\nInstall for current project only:\n```bash\nrins_hooks install auto-commit --project\n```\n\n### Local Installation\nInstall locally (not committed to git):\n```bash\nrins_hooks install auto-commit --local\n```\n\n## 🔧 Commands\n\n### Installation\n```bash\n# Interactive installation\nrins_hooks install --interactive\n\n# Install specific hooks\nrins_hooks install auto-commit notification\n\n# Install all hooks\nrins_hooks install --all\n\n# Dry run (preview changes)\nrins_hooks install auto-commit --dry-run\n```\n\n### Management\n```bash\n# List available hooks\nrins_hooks list\n\n# Show installation status\nrins_hooks status\n\n# Show configuration\nrins_hooks config --show\n\n# Validate configuration\nrins_hooks config --validate\n\n# Run diagnostics\nrins_hooks doctor\n```\n\n### Uninstallation\n```bash\n# Uninstall specific hooks\nrins_hooks uninstall auto-commit\n\n# Uninstall all hooks\nrins_hooks uninstall --all\n```\n\n## ⚙️ Configuration\n\n### Auto-Commit Hook Configuration\n\nThe auto-commit hook can be customized through its configuration:\n\n```json\n{\n  \"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 \u003cnoreply@anthropic.com\u003e\",\n  \"excludePatterns\": [\n    \"*.log\", \"*.tmp\", \".env*\", \"*.key\", \"node_modules/**\", \".git/**\"\n  ],\n  \"skipEmptyCommits\": true,\n  \"branchRestrictions\": [\"main\", \"master\"],\n  \"maxCommitMessageLength\": 500\n}\n```\n\n### Code Formatter Configuration\n\nConfigure formatters for different file types:\n\n```json\n{\n  \"formatters\": {\n    \".js\": \"prettier --write\",\n    \".py\": \"black\",\n    \".go\": \"gofmt -w\",\n    \".rs\": \"rustfmt\"\n  },\n  \"excludePatterns\": [\"node_modules/**\", \"dist/**\"],\n  \"failOnError\": false\n}\n```\n\n### Notification Configuration\n\nSet up notifications and integrations:\n\n```json\n{\n  \"desktopNotifications\": true,\n  \"integrations\": {\n    \"slack\": {\n      \"enabled\": true,\n      \"webhook\": \"https://hooks.slack.com/...\",\n      \"channel\": \"#dev\"\n    },\n    \"discord\": {\n      \"enabled\": true,\n      \"webhook\": \"https://discord.com/api/webhooks/...\"\n    }\n  }\n}\n```\n\n## 🛠️ Requirements\n\n- **Node.js**: \u003e= 16.0.0\n- **Claude Code**: Latest version\n- **Git**: For auto-commit functionality\n- **Formatters**: Optional, based on enabled hooks\n\n## 🔍 Diagnostics\n\nRun the built-in diagnostics to check your setup:\n\n```bash\nrins_hooks doctor\n```\n\nThis will check:\n- ✅ Node.js version compatibility\n- ✅ Claude Code installation\n- ✅ Git availability and repository status\n- ✅ Settings directory permissions\n- ✅ Configuration file validity\n\n## 📁 File Structure\n\n```\n~/.claude/                          # Claude Code settings directory\n├── settings.json                   # User-level hooks\n└── projects/\n    └── your-project/\n        └── .claude/\n            ├── settings.json       # Project-level hooks\n            └── settings.local.json # Local hooks (not committed)\n```\n\n## 🔒 Security Considerations\n\n- Hooks execute with your user permissions\n- Review hook configurations before installation\n- Use project-level installation for team settings\n- Keep sensitive configurations in local settings\n- Regularly update to latest versions\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n**Hook not executing:**\n```bash\n# Check installation status\nrins_hooks status\n\n# Validate configuration\nrins_hooks config --validate\n\n# Run diagnostics\nrins_hooks doctor\n```\n\n**Permission errors:**\n- Ensure Claude Code settings directory is writable\n- Check file permissions on hook scripts\n- Verify git repository permissions for auto-commit\n\n**Formatter not found:**\n- Install required formatters globally\n- Check PATH configuration\n- Use `rins_hooks doctor` to verify dependencies\n\n## 🤝 Contributing\n\nWe welcome contributions! Here's how to get started:\n\n1. Fork the repository\n2. Create a feature branch\n3. Add your hook or improvement\n4. Test thoroughly across platforms\n5. Submit a pull request\n\n### Creating Custom Hooks\n\nExtend the `HookBase` class:\n\n```javascript\nconst HookBase = require('rins_hooks/src/hook-base');\n\nclass MyCustomHook extends HookBase {\n  constructor(config = {}) {\n    super('my-custom-hook', config);\n  }\n\n  async execute(input) {\n    // Your hook logic here\n    return this.success({ message: 'Hook executed successfully' });\n  }\n}\n```\n\n## 📄 License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## 🔗 Links\n\n- [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)\n- [GitHub Repository](https://github.com/your-username/rins_hooks)\n- [Issue Tracker](https://github.com/your-username/rins_hooks/issues)\n- [NPM Package](https://www.npmjs.com/package/rins_hooks)\n\n## 🙏 Acknowledgments\n\n- [Anthropic](https://anthropic.com) for Claude Code\n- Open source community for formatter tools\n- Contributors and testers\n\n---\n\n**Made with ❤️ for the Claude Code community**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinadelph%2Frins_hooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frinadelph%2Frins_hooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinadelph%2Frins_hooks/lists"}