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.12/prefligit-installer.sh | sh

# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prefligit/releases/download/v0.0.12/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.12.tar.gz (121.4 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.12-py3-none-win_amd64.whl (3.9 MB view details)

Uploaded Python 3Windows x86-64

prefligit-0.0.12-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.12-py3-none-macosx_11_0_arm64.whl (4.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

prefligit-0.0.12-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.12.tar.gz.

File metadata

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

File hashes

Hashes for prefligit-0.0.12.tar.gz
Algorithm Hash digest
SHA256 38b25deccac37718c23143aaecfc0590e2c67c9816a8e525d038da6958a1eac8
MD5 f860d182bd6e2dee5c84972da450b19f
BLAKE2b-256 14cace3749412582d98235f21b050d1bf9962af30bbfbed7fcee74887d65716e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.12-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 1ab9ab69d31aaca5c56521965adfc2851bd2b7e310711dd13c7de3483581aef2
MD5 b9b94bc891b42dabf2c82f91773a5015
BLAKE2b-256 d3e8828501b79920c87e6f881855b0fad6feb19cea34ad72460dbf139b95e970

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.12-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b09320efca2717986e82769a103d31c6dbcdb66fefeab0a825df603c0e1ac022
MD5 d45435fbcf7a09656093c727997c1504
BLAKE2b-256 80990e7b8100adc263bc85023121b36e6e8709180c5b527ef5fb8cbcf6fd7e4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.12-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 883dba615cf14468478afa515a4b0c4afb24c06f553eee193703b7fe23e8550b
MD5 b280179f88197f25617dbc48b1602944
BLAKE2b-256 e8707f15ee2c8cb4da00a7553a1489314d99a7bd6ea60c60fa6c61077f7c7144

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.12-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 064d0c9359210051ad019b66aa40bc671f8c179aa68a0049bdc83669c0b63b17
MD5 2523614ac196380126096216eb973be2
BLAKE2b-256 533492ff4e17127642e7071f85f4a545fba447b81cb34ee540d5ba1a6d82928f

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