Skip to main content

pre-commit reimplemented in Rust

Project description

prefligit

Development Status CI

prefligit

A reimplementation of the pre-commit tool in Rust, designed to be a faster, dependency-free and drop-in alternative, while also providing some additional opinionated features.

[!WARNING] This project is still in very early development, only a few of the original pre-commit features are implemented. It is not recommended for normal use yet, but feel free to try it out and provide feedback.

[!NOTE] This project was previously named pre-commit-rs, but it was renamed to prefligit to prevent confusion with the existing pre-commit tool. See #73 for more information.

Features

  • A single binary with no dependencies, does not require Python or any other runtime.
  • Fully compatible with the original pre-commit configurations and hooks.
  • Improved performance in hook preparation and execution.
  • Integration with uv for managing Python virtual environments and dependencies.
  • Improved toolchain installations for Python, Node.js, Go, Rust and Ruby, shared between hooks.
  • Built-in implementation of some common hooks.
  • (TODO) Built-in support for monorepos.

Installation

Standalone installer

prefligit provides a standalone installer script to download and install the tool:

# On Linux and macOS
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prefligit/releases/download/v0.0.11/prefligit-installer.sh | sh

# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prefligit/releases/download/v0.0.11/prefligit-installer.ps1 | iex"
PyPI

prefligit is published as Python binary wheel to PyPI, you can install it using pip, uv (recommended), or pipx:

pip install prefligit

# or

uv tool install prefligit

# or

pipx install prefligit
Homebrew
brew install j178/tap/prefligit
Cargo

Build from source using Cargo:

cargo install --locked --git https://github.com/j178/prefligit
GitHub Releases

prefligit release artifacts can be downloaded directly from the GitHub releases.

Usage

This tool is designed to be a drop-in alternative for the original pre-commit tool, so you can use it with your existing configurations and hooks.

Please refer to the official documentation for more information on how to configure and use pre-commit.

Acknowledgements

This project is heavily inspired by the original pre-commit tool, and it wouldn't be possible without the hard work of the maintainers and contributors of that project.

And a special thanks to the Astral team for their remarkable projects, particularly uv, from which I've learned a lot on how to write efficient and idiomatic Rust code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prefligit-0.0.11.tar.gz (120.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

prefligit-0.0.11-py3-none-win_amd64.whl (3.9 MB view details)

Uploaded Python 3Windows x86-64

prefligit-0.0.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

prefligit-0.0.11-py3-none-macosx_11_0_arm64.whl (4.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

prefligit-0.0.11-py3-none-macosx_10_12_x86_64.whl (4.5 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file prefligit-0.0.11.tar.gz.

File metadata

  • Download URL: prefligit-0.0.11.tar.gz
  • Upload date:
  • Size: 120.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for prefligit-0.0.11.tar.gz
Algorithm Hash digest
SHA256 17ee2bc0e76ba26527755f0c36052f42046bb8451969c4ad88a3c94c301969f8
MD5 7559ff131ed8d09372d6ebe217b14e4e
BLAKE2b-256 93c3a051c28657afe181cc873faff9fbb036b0b85cd71460c033444ffad2dd65

See more details on using hashes here.

File details

Details for the file prefligit-0.0.11-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for prefligit-0.0.11-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2374f6da8f03f0c3adb1e15d85677f51866caa29573dccca6c20170e59e06687
MD5 86e115cba3b7077ef31bc8fc25cc37fe
BLAKE2b-256 71967c9c568c9b4334967ab0ad34f286264c15899abe19daed3d309ac3959f17

See more details on using hashes here.

File details

Details for the file prefligit-0.0.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for prefligit-0.0.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4aea41e665a5dd2d93b56d36e0a045600074b46ec2373259d8258a44f45865ab
MD5 b9e6f7045d36d2d234f30d36e39f0d57
BLAKE2b-256 f55fb9c4982ef83763ca7d939fa0dd7927d5996a802a749318a6626e07dadb72

See more details on using hashes here.

File details

Details for the file prefligit-0.0.11-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for prefligit-0.0.11-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d214a23981a5fc856dada131a7f5a7e423e4e5d79ae7ecf8427df6780614f8f
MD5 e056a2f788d2c70e34bb3807ed2cfc56
BLAKE2b-256 9b6bfa78da387f0e94c3e36a1a35a40bc5991395c8c392cea48278e7d2e5fe70

See more details on using hashes here.

File details

Details for the file prefligit-0.0.11-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for prefligit-0.0.11-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7256148ecbd15655feac0912d2835f2b17087ce16a4b151366851ee788fbde58
MD5 30f553dc94ce3e5ec51c77e81ad4b507
BLAKE2b-256 b81359427b003297922ddda4cc648eadea5ff3be88d14ef77666af50c310aa5c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page