Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RustyHook

RustyHook is a blazing-fast, Rust-native Git hook runner designed to be a modern, drop-in replacement for pre-commit. It is language-agnostic, monorepo-friendly, and automatically provisions environments for linters and checkers written in Python, Node.js, Ruby, and more.

Features

  • 🚀 Fast and concurrent execution powered by Rust
  • 🧰 Automatic setup of Python virtualenvs, Node/npm environments, and Ruby/bundler installs
  • 🌐 Language-agnostic support with consistent hook interface
  • 🏗️ Monorepo-first with per-directory or per-project configurations
  • 🪝 Compatibility with .pre-commit-config.yaml
  • 🧙 Migration tool to convert pre-commit configs to native .rustyhook/config.yaml
  • 📦 Cache-aware tool installs and version pinning
  • 🆔 CLI alias: rh

Quick Start

# Install RustyHook
cargo install rustyhook

# Initialize a new configuration
rh init

# Run your hooks
rh run

For more detailed information, check out the Getting Started guide.

Documentation Sections

  • User Guide: Learn how to install, configure, and use RustyHook
  • Reference: Detailed reference for supported languages, hook types, and configuration options
  • Advanced: Advanced topics like monorepo support, custom hooks, and performance tuning
  • Contributing: Information for developers who want to contribute to RustyHook

License

RustyHook is licensed under the MIT License.

Acknowledgments

  • Inspired by pre-commit, lefthook, moonrepo, and the Rust community
  • Shoutout to contributors and early testers helping shape this project