pre-commit reimplemented in Rust
Project description
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 toprefligit
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.
- Improved performance in hook preparation and execution.
- Fully compatible with the original pre-commit configurations and hooks.
- Integration with
uv
for managing Python tools and environments. - (TODO) Built-in support for monorepos.
- (TODO) Built-in implementation of some common hooks.
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.10/prefligit-installer.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prefligit/releases/download/v0.0.10/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
Built Distributions
File details
Details for the file prefligit-0.0.10.tar.gz
.
File metadata
- Download URL: prefligit-0.0.10.tar.gz
- Upload date:
- Size: 107.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1c699afc61e45e278c9da6007e82c5e22cc794f1c8d7a54b7a84d3a4611309da
|
|
MD5 |
b6eb52a921a442fe451818f1c5e851e0
|
|
BLAKE2b-256 |
fa40f31f3f4570776da072df0764511d82dbccdbda335f0f64c75c32526f68bb
|
File details
Details for the file prefligit-0.0.10-py3-none-win_amd64.whl
.
File metadata
- Download URL: prefligit-0.0.10-py3-none-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0e4e2ae881c2bbb2dc0d592d08e2af0d4be4fe25fe71367dc90b2166d1a689fd
|
|
MD5 |
21e79b3235f38d7eacb3722046729002
|
|
BLAKE2b-256 |
4409a33638e5c6307c9a04ab8a3d80eb8405ebd473dc247eff5aa42117fb60ba
|
File details
Details for the file prefligit-0.0.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: prefligit-0.0.10-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4565296552f48a1a22dc782d063da13aff4dfe46db56e967602271a7c8103847
|
|
MD5 |
fba1a4bfa1d078acf21d92a788bd586e
|
|
BLAKE2b-256 |
369ac4044e0513775b37a2b4980d1524017c58bf54a9368a1cbfee8ee8ed4f73
|
File details
Details for the file prefligit-0.0.10-py3-none-macosx_11_0_arm64.whl
.
File metadata
- Download URL: prefligit-0.0.10-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.1 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
22cc60be9fb4ce4178b6535d60825a0977a16265b58814247c351870091f54c3
|
|
MD5 |
0f149a8e0a90755f004497a26eb3e387
|
|
BLAKE2b-256 |
6af8a2448448e4b70d8990a00d1df5a9c9f551674c2c36f3dc988002c0245ea0
|
File details
Details for the file prefligit-0.0.10-py3-none-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: prefligit-0.0.10-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 4.3 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.6.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
b0d73361bb5453bfca3edaaba1c08948ef92cfeef75c642b15d916781ef0ac58
|
|
MD5 |
f1e37be7a2d16fb89f57fe41b8b3e86d
|
|
BLAKE2b-256 |
823341b37e527947d803e18a592d873ce44cc5d1dc17347f9754e8dd843c64d8
|