# prefligit

[](https://github.com/j178/prefligit/actions/workflows/ci.yml)
[](https://github.com/j178/prefligit/releases)
<img width="250" alt="prefligit" src="https://github.com/user-attachments/assets/49080cb0-f528-4aa5-acb7-5a88eb9eff4a">
[pre-commit](https://pre-commit.com/) is a framework to run hooks written in many languages, and it manages the language toolchain and dependencies for running the hooks.
`prefligit` is a reimagined version of pre-commit, built in Rust. It is designed to be a faster, dependency-free and drop-in alternative for it, while also providing some additional long-requested features.
> [!WARNING]
> This project is still in early stage of development, only a few of the original pre-commit features are implemented.
> It is not production-ready yet, but feel free to try it out and provide feedback.
>
> Current supported languages are `python`, `node`, `docker`, `docker-image`, `system`, `script` and `fail`.
> [!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](https://github.com/j178/prefligit/issues/73) for more information.
## Features
- 🚀 A single binary with no dependencies, does not require Python or any other runtime.
- ⚡ About [10x faster](https://github.com/j178/prefligit/blob/master/BENCHMARK.md) than `pre-commit` and uses only a third of disk space.
- 🔄 Fully compatible with the original pre-commit configurations and hooks.
- 🐍 Integration with [`uv`](https://github.com/astral-sh/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.
## Usage
```console
$ prefligit run
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
typos....................................................................Passed
cargo fmt................................................................Passed
cargo clippy.............................................................Passed
```
`prefligit` 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](https://pre-commit.com/) for more information on how to configure and use pre-commit.
## Installation
<details>
<summary>Standalone installer</summary>
`prefligit` provides a standalone installer script to download and install the tool:
```console
# On Linux and macOS
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prefligit/releases/download/v0.0.19/prefligit-installer.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prefligit/releases/download/v0.0.19/prefligit-installer.ps1 | iex"
```
</details>
<details>
<summary>PyPI</summary>
`prefligit` is published as Python binary wheel to PyPI, you can install it using `pip`, `uv` (recommended), or `pipx`:
```console
pip install prefligit
# or
uv tool install prefligit
# or
pipx install prefligit
```
</details>
<details>
<summary>Homebrew</summary>
```console
brew install prefligit
```
</details>
<details>
<summary>Cargo</summary>
Build from source using Cargo:
```console
cargo install --locked --git https://github.com/j178/prefligit
```
</details>
<details>
<summary>GitHub Releases</summary>
`prefligit` release artifacts can be downloaded directly from the [GitHub releases](https://github.com/j178/prefligit/releases).
</details>
If installed via the standalone installer, `prefligit` can update itself to the latest version:
```console
$ prefligit self update
```
## Acknowledgements
This project is heavily inspired by the original [pre-commit](https://pre-commit.com/) 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](https://github.com/astral-sh) team for their remarkable projects, particularly [uv](https://github.com/astral-sh/uv),
from which I've learned a lot on how to write efficient and idiomatic Rust code.
Raw data
{
"_id": null,
"home_page": "https://github.com/j178/prefligit",
"name": "prefligit",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "pre-commit, git, hooks",
"author": null,
"author_email": "j178 <hi@j178.dev>",
"download_url": "https://files.pythonhosted.org/packages/03/7e/bbce386dbd32ef62c1d97892acb729ad1a0d48811bd2181bf4135cbb00ee/prefligit-0.0.19.tar.gz",
"platform": null,
"description": "# prefligit\n\n\n[](https://github.com/j178/prefligit/actions/workflows/ci.yml)\n[](https://github.com/j178/prefligit/releases)\n\n<img width=\"250\" alt=\"prefligit\" src=\"https://github.com/user-attachments/assets/49080cb0-f528-4aa5-acb7-5a88eb9eff4a\">\n\n[pre-commit](https://pre-commit.com/) is a framework to run hooks written in many languages, and it manages the language toolchain and dependencies for running the hooks.\n\n`prefligit` is a reimagined version of pre-commit, built in Rust. It is designed to be a faster, dependency-free and drop-in alternative for it, while also providing some additional long-requested features.\n\n> [!WARNING]\n> This project is still in early stage of development, only a few of the original pre-commit features are implemented.\n> It is not production-ready yet, but feel free to try it out and provide feedback.\n>\n> Current supported languages are `python`, `node`, `docker`, `docker-image`, `system`, `script` and `fail`.\n\n> [!NOTE]\n> This project was previously named `pre-commit-rs`, but it was renamed to `prefligit` to prevent confusion with the existing pre-commit tool.\n> See [#73](https://github.com/j178/prefligit/issues/73) for more information.\n\n## Features\n\n- \ud83d\ude80 A single binary with no dependencies, does not require Python or any other runtime.\n- \u26a1 About [10x faster](https://github.com/j178/prefligit/blob/master/BENCHMARK.md) than `pre-commit` and uses only a third of disk space.\n- \ud83d\udd04 Fully compatible with the original pre-commit configurations and hooks.\n- \ud83d\udc0d Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python virtual environments and dependencies.\n- \ud83d\udee0\ufe0f Improved toolchain installations for Python, Node.js, Go, Rust and Ruby, shared between hooks.\n- \ud83d\udce6 Built-in implementation of some common hooks.\n- \ud83c\udfd7\ufe0f (TODO) Built-in support for monorepos.\n\n## Usage\n\n```console\n$ prefligit run\ntrim trailing whitespace.................................................Passed\nfix end of files.........................................................Passed\ntypos....................................................................Passed\ncargo fmt................................................................Passed\ncargo clippy.............................................................Passed\n```\n\n`prefligit` 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.\n\nPlease refer to the [official documentation](https://pre-commit.com/) for more information on how to configure and use pre-commit.\n\n## Installation\n\n<details>\n<summary>Standalone installer</summary>\n\n`prefligit` provides a standalone installer script to download and install the tool:\n\n```console\n# On Linux and macOS\ncurl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prefligit/releases/download/v0.0.19/prefligit-installer.sh | sh\n\n# On Windows\npowershell -ExecutionPolicy ByPass -c \"irm https://github.com/j178/prefligit/releases/download/v0.0.19/prefligit-installer.ps1 | iex\"\n```\n</details>\n\n<details>\n<summary>PyPI</summary>\n\n`prefligit` is published as Python binary wheel to PyPI, you can install it using `pip`, `uv` (recommended), or `pipx`:\n\n```console\npip install prefligit\n\n# or\n\nuv tool install prefligit\n\n# or\n\npipx install prefligit\n```\n</details>\n\n<details>\n<summary>Homebrew</summary>\n\n```console\nbrew install prefligit\n```\n</details>\n\n<details>\n<summary>Cargo</summary>\n\nBuild from source using Cargo:\n\n```console\ncargo install --locked --git https://github.com/j178/prefligit\n```\n</details>\n\n<details>\n<summary>GitHub Releases</summary>\n\n`prefligit` release artifacts can be downloaded directly from the [GitHub releases](https://github.com/j178/prefligit/releases).\n</details>\n\nIf installed via the standalone installer, `prefligit` can update itself to the latest version:\n\n```console\n$ prefligit self update\n```\n\n## Acknowledgements\n\nThis project is heavily inspired by the original [pre-commit](https://pre-commit.com/) tool, and it wouldn't be possible without the hard work\nof the maintainers and contributors of that project.\n\nAnd a special thanks to the [Astral](https://github.com/astral-sh) team for their remarkable projects, particularly [uv](https://github.com/astral-sh/uv),\nfrom which I've learned a lot on how to write efficient and idiomatic Rust code.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Better `pre-commit`, re-engineered in Rust",
"version": "0.0.19",
"project_urls": {
"Changelog": "https://github.com/j178/prefligit/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/j178/prefligit",
"Releases": "https://github.com/j178/prefligit/releases",
"Repository": "https://github.com/j178/prefligit"
},
"split_keywords": [
"pre-commit",
" git",
" hooks"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c620507249b61ebbab883d4b315d138c3b10a21597c424aec10afc59aa97c46b",
"md5": "2fe4c160617f02bd3c275f145220ec39",
"sha256": "6cb706279dfc561af123613d1c87a3a5047954576f31cfaee681723acce46803"
},
"downloads": -1,
"filename": "prefligit-0.0.19-py3-none-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "2fe4c160617f02bd3c275f145220ec39",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4825306,
"upload_time": "2025-08-04T17:45:18",
"upload_time_iso_8601": "2025-08-04T17:45:18.015216Z",
"url": "https://files.pythonhosted.org/packages/c6/20/507249b61ebbab883d4b315d138c3b10a21597c424aec10afc59aa97c46b/prefligit-0.0.19-py3-none-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b85fd88daf6310b31bd030d4a9af19cc080f5d5710068d803a4f10cede062869",
"md5": "e2469d067bd37ff21b7619b3d7079240",
"sha256": "9398847ab902cf0022a3be27ff0b7c9e6c84629117b7eac6ac72c276e9c7b1fe"
},
"downloads": -1,
"filename": "prefligit-0.0.19-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "e2469d067bd37ff21b7619b3d7079240",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4607766,
"upload_time": "2025-08-04T17:45:20",
"upload_time_iso_8601": "2025-08-04T17:45:20.106462Z",
"url": "https://files.pythonhosted.org/packages/b8/5f/d88daf6310b31bd030d4a9af19cc080f5d5710068d803a4f10cede062869/prefligit-0.0.19-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9f8bd2610d9302d4f746c345e4bba471ba1a3eadd77e3ca717d31f774910f0bb",
"md5": "651116adec43797ebb9be87f05576cc1",
"sha256": "53d3be634de03a408744e24808b00b914438529382d87b5c5d889d041aa1a9e4"
},
"downloads": -1,
"filename": "prefligit-0.0.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "651116adec43797ebb9be87f05576cc1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5160138,
"upload_time": "2025-08-04T17:45:22",
"upload_time_iso_8601": "2025-08-04T17:45:22.360743Z",
"url": "https://files.pythonhosted.org/packages/9f/8b/d2610d9302d4f746c345e4bba471ba1a3eadd77e3ca717d31f774910f0bb/prefligit-0.0.19-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0c9ebce576fcff5e0dac1eaaa95593cffe313ddb77159b549a6112da390afd63",
"md5": "c424beb032e41e8037a5d936aeabc1fc",
"sha256": "40d64ea139b2146d2398d3328aa3aa891842a5b2b5eb2de57af5096eea12fcca"
},
"downloads": -1,
"filename": "prefligit-0.0.19-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "c424beb032e41e8037a5d936aeabc1fc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4217950,
"upload_time": "2025-08-04T17:45:25",
"upload_time_iso_8601": "2025-08-04T17:45:25.334873Z",
"url": "https://files.pythonhosted.org/packages/0c/9e/bce576fcff5e0dac1eaaa95593cffe313ddb77159b549a6112da390afd63/prefligit-0.0.19-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "037ebbce386dbd32ef62c1d97892acb729ad1a0d48811bd2181bf4135cbb00ee",
"md5": "3587a7a917b1f0b420e8206480bf5d1e",
"sha256": "f859a474a9f551cc639146ced0f6242f08c4f69dc80d97a4db6028b98d95c94b"
},
"downloads": -1,
"filename": "prefligit-0.0.19.tar.gz",
"has_sig": false,
"md5_digest": "3587a7a917b1f0b420e8206480bf5d1e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 135906,
"upload_time": "2025-08-04T17:45:26",
"upload_time_iso_8601": "2025-08-04T17:45:26.608065Z",
"url": "https://files.pythonhosted.org/packages/03/7e/bbce386dbd32ef62c1d97892acb729ad1a0d48811bd2181bf4135cbb00ee/prefligit-0.0.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-04 17:45:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "j178",
"github_project": "prefligit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "prefligit"
}