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

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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3macOS 11.0+ ARM64

prefligit-0.0.14-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.14.tar.gz.

File metadata

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

File hashes

Hashes for prefligit-0.0.14.tar.gz
Algorithm Hash digest
SHA256 e7b97ece8a3813bf12996a29d75aef11fd7a518e84c32f8891a57cf452d141e0
MD5 77b38add14fe0b06858336441fb95864
BLAKE2b-256 fe29caf019381e34049272f2829008e0f766b3004ccc5a1cd39a9f87744ae86f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.14-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 c10f537b7cabdd007cca6735e5b9c10b371d527e0aa7c1e1614c425283910a56
MD5 5768ceaca612413e80fcb423acd256ca
BLAKE2b-256 df71cbff26a3d3074402d411d2809e2daa328cf461d2d3db8f9e2dcdd6c44f74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.14-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 390c7e02831d5124699dba283b0db2049b822660f15c28e93961bd29299be91a
MD5 d26ea90bcc081e0cdcd812c5a7459761
BLAKE2b-256 5256d53cb3c23d09906a358e2cc196ac83acd0f83447c865173f34ba785ec685

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.14-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 427650732e90e317b820c8d27d869692a30cf3785c4831b0196b9743723ba6e8
MD5 eb512f87b59e0548efa7f673ff9b6684
BLAKE2b-256 86f440bd8198f0eb86fb05e439036832d57cbf684d3dd0532aa8374ce5a7b8aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefligit-0.0.14-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1f36501c1322282f476fed125fba2622aef6ac65623d31e99717e4c96244e504
MD5 326b8c53a33297a2f1fff106763f640b
BLAKE2b-256 d077f011665810141d11e4d3c4115dbd08f8db99d2d5a2b800c20ef9d1f97e20

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