Skip to content

Releases: KurtWeston/hook-test

hook-test v1.0.0

15 Jan 16:11

Choose a tag to compare

🎣 Hook-Test v1.0.0 - Test Git Hooks Without Committing

We're excited to announce the first stable release of hook-test, a powerful CLI tool that lets you test git hooks locally without making actual commits. Perfect for debugging pre-commit scripts, validating commit-msg hooks, and ensuring your git workflow automation works flawlessly before deployment.

✨ Key Features

  • 🔄 Universal Hook Support - Execute any git hook script (pre-commit, pre-push, commit-msg, prepare-commit-msg, etc.) in a simulated environment
  • 📁 Staged File Simulation - Provide sample staged files for pre-commit hook testing with configurable file lists
  • 🌍 Accurate Environment Mocking - Mock git environment variables (GIT_DIR, GIT_INDEX_FILE, etc.) with precision
  • 💬 Commit Message Testing - Test commit-msg hooks with sample commit messages
  • 📊 Clear Output Display - View hook output (stdout/stderr) with formatted, readable results
  • ✅ Exit Code Interpretation - See hook exit codes and understand success/failure states instantly
  • ⚙️ Flexible Configuration - Support custom sample data via command-line arguments or config files
  • 🔍 Pre-execution Validation - Validate hook scripts exist and are executable before running
  • 🐛 Verbose Debugging Mode - Enable detailed logging for troubleshooting hook execution
  • 📂 Custom Hook Directories - Test hooks from custom .git/hooks directory or standalone scripts

🚀 Installation