git-sentry
v1.0.2
Published
Configuration-driven Git hooks manager for modern development workflows.
Maintainers
Readme
Git-Sentry
Overview
Git-Sentry is a lightweight, configuration-driven Git hooks manager for modern development workflows. It allows you to define, manage, and execute commands across any Git hook using a simple JSON configuration file.
Features
- 🚀 Zero Dependency Hooks: Automatically installs and delegates hooks without manual script editing.
- ⚙️ Config Driven: Manage all your hooks in a single
.gitsentryrcfile. - ⚡ Parallel Execution: Run multiple linting/testing commands concurrently for speed.
- 🛡️ Fail Fast: Stop execution immediately if a critical command fails.
- 🌿 Branch & Commit Filters: Run hooks only on specific branches or skip them based on commit messages.
- ⏱️ Timeouts: Prevent long-running or hung processes from blocking your workflow.
Installation
npm install git-sentry --save-dev
# or
pnpm add git-sentry -DQuick Start
Initialize Git-Sentry in your project:
npx git-sentry initThis creates a default
.gitsentryrcand sets up the necessary Git hook delegations.Configure your hooks in
.gitsentryrc:{ "hooks": { "pre-commit": { "commands": ["npm run lint", "npm run test"], "options": { "parallel": true, "failFast": true } } } }Automate Setup: Add Git-Sentry to your
package.jsonscripts to ensure hooks are automatically initialized for all contributors:{ "scripts": { "prepare": "git-sentry init" } }Note: Use
postinstallif you are using a package manager that doesn't supportpreparehooks.Profit! Your hooks will now trigger automatically on Git actions.
📚 Documentation
For a deep dive into all available options and advanced configurations, visit our Official Wiki.
Contributing
Contributions are welcome! Please see our CONTRIBUTING.md for details on how to get started, report bugs, and submit features.
