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

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3macOS 11.0+ ARM64

prefligit-0.0.13-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.13.tar.gz.

File metadata

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

File hashes

Hashes for prefligit-0.0.13.tar.gz
Algorithm Hash digest
SHA256 003d4ce3248fea349bb7de3552f3d79af9bb8758415a7c0f016303c4ca4a52ab
MD5 9abc69afe2c07521110130aaa3aaf4c7
BLAKE2b-256 55648e3d373b656ae9f78529efa40cadc128f1cfc6b4985ec147e1cb741c3536

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.13-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 455db19f59250a71f59b4e2c29529ec018a934d50ce89a373bfdcef2354eafbf
MD5 3827c099f4d8aaed0e310ba60019811d
BLAKE2b-256 2db669ff81aabe7dab526a805415f05f1571021187e44ca98d77925d3a19f548

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.13-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e93419167b1c471c5b1b2ee94057c83331e3be9443ac074d17a0b1f4d992503
MD5 1ac5e76b539476dcae00ae15d63f5c0b
BLAKE2b-256 104b0f41e294154dedbd5bb7c5728851ce312779005af90b3d3e0b7058523d4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.13-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7accc6aa179eb6147052422a867a051f55a9ca33c1f2aa0f032ee985a3f7eb54
MD5 5ad1b9a0243c11b1c5d09186354a16e6
BLAKE2b-256 59a175ab2a7fabff4506a6bbfd233d81fb3bdaa25b83f512f59da5152e0242f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.13-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9230e36da04e2aac51e4ac6be47bcac19002c1aba3bd8f571c55630618fb221f
MD5 6aa8c1e7a3cd183677119ddf777dd693
BLAKE2b-256 5f13ae087fbe4c4fb39cf0380fa9b2e750cdb472628ca73c9e05000207d9e346

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