# prefligit

[](https://github.com/j178/prefligit/actions/workflows/ci.yml)
<img width="665" alt="prefligit" src="https://github.com/user-attachments/assets/dd2d48d0-d825-407e-9248-e74660b445de">
A reimplementation of the [pre-commit](https://pre-commit.com/) 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](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.
- Improved performance in hook preparation and execution.
- Fully compatible with the original pre-commit configurations and hooks.
- Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python tools and environments.
- (TODO) Built-in support for monorepos.
- (TODO) Built-in implementation of some common hooks.
## 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.9/prefligit-installer.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prefligit/releases/download/v0.0.9/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 j178/tap/prefligit
```
</details>
<details>
<summary>Cargo</summary>
Build from source using Cargo:
```console
cargo install --locked prefligit
```
Install from the binary directly using `cargo binstall`:
```console
cargo binstall 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>
## 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](https://pre-commit.com/) for more information on how to configure and use pre-commit.
## 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": "j178 <hi@j178.dev>",
"author_email": "j178 <hi@j178.dev>",
"download_url": "https://files.pythonhosted.org/packages/ca/a4/4c50e673ebe201c09df30bf3f99f3f2b7ed6b9e81f4a4b7e170185b50c37/prefligit-0.0.9.tar.gz",
"platform": null,
"description": "# prefligit\n\n\n[](https://github.com/j178/prefligit/actions/workflows/ci.yml)\n\n<img width=\"665\" alt=\"prefligit\" src=\"https://github.com/user-attachments/assets/dd2d48d0-d825-407e-9248-e74660b445de\">\n\nA reimplementation of the [pre-commit](https://pre-commit.com/) tool in Rust, designed to be a faster, dependency-free and drop-in alternative,\nwhile also providing some additional opinionated features.\n\n> [!WARNING]\n> This project is still in very early development, only a few of the original pre-commit features are implemented.\n> It is not recommended for normal use yet, but feel free to try it out and provide feedback.\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- A single binary with no dependencies, does not require Python or any other runtime.\n- Improved performance in hook preparation and execution.\n- Fully compatible with the original pre-commit configurations and hooks.\n- Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python tools and environments.\n- (TODO) Built-in support for monorepos.\n- (TODO) Built-in implementation of some common hooks.\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.9/prefligit-installer.sh | sh\n\n# On Windows\npowershell -ExecutionPolicy ByPass -c \"irm https://github.com/j178/prefligit/releases/download/v0.0.9/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 j178/tap/prefligit\n```\n</details>\n\n<details>\n<summary>Cargo</summary>\n\nBuild from source using Cargo:\n\n```console\ncargo install --locked prefligit\n```\n\nInstall from the binary directly using `cargo binstall`:\n\n```console\ncargo binstall 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\n\n## Usage\n\nThis 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.\n\nPlease refer to the [official documentation](https://pre-commit.com/) for more information on how to configure and use pre-commit.\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": "pre-commit reimplemented in Rust",
"version": "0.0.9",
"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": "a6ce79ac13b54517e9320ebf718d0447022d1cf80847cf093af825dff23c28b0",
"md5": "271e6c491dc80bf483e59a10cbfeade6",
"sha256": "7e02cc2afbd8c1b882fc524113b0fe7ecd713b33281bbfa610769a151c31a6a5"
},
"downloads": -1,
"filename": "prefligit-0.0.9-py3-none-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "271e6c491dc80bf483e59a10cbfeade6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4323916,
"upload_time": "2025-02-18T07:28:44",
"upload_time_iso_8601": "2025-02-18T07:28:44.728466Z",
"url": "https://files.pythonhosted.org/packages/a6/ce/79ac13b54517e9320ebf718d0447022d1cf80847cf093af825dff23c28b0/prefligit-0.0.9-py3-none-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9b11f6d423116bd856ed62766025507a1ea7f43e3c5151cd2956d6ae8b6b03c6",
"md5": "1b2367073bb3274f539c356e3bbea1cc",
"sha256": "ba8b6ec820216d8eff10993fb84ad1528c253ae4dea0ec7b1043168c159c2612"
},
"downloads": -1,
"filename": "prefligit-0.0.9-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "1b2367073bb3274f539c356e3bbea1cc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4147879,
"upload_time": "2025-02-18T07:28:47",
"upload_time_iso_8601": "2025-02-18T07:28:47.015557Z",
"url": "https://files.pythonhosted.org/packages/9b/11/f6d423116bd856ed62766025507a1ea7f43e3c5151cd2956d6ae8b6b03c6/prefligit-0.0.9-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "74e9e4932bee6a8da5bd74d913fdd131fc338ab4859bb064ad5ef3c759183606",
"md5": "d1cc24642fbc810c1b3710716b2a1e91",
"sha256": "505810b2661b0720f234ecae16cc928e0c9379b4b061d991f77712695e235157"
},
"downloads": -1,
"filename": "prefligit-0.0.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "d1cc24642fbc810c1b3710716b2a1e91",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4655992,
"upload_time": "2025-02-18T07:28:49",
"upload_time_iso_8601": "2025-02-18T07:28:49.397918Z",
"url": "https://files.pythonhosted.org/packages/74/e9/e4932bee6a8da5bd74d913fdd131fc338ab4859bb064ad5ef3c759183606/prefligit-0.0.9-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6b954055d618e40adac143c6a4f3e014e1c8905ebfa272675f1be64894cbe9cb",
"md5": "2213649ea3cf2d87b4136a7729545a96",
"sha256": "659f33b180ce2c609184d5e70c75b22938823c58ea54b913df7bcd007c1e3e67"
},
"downloads": -1,
"filename": "prefligit-0.0.9-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "2213649ea3cf2d87b4136a7729545a96",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3785703,
"upload_time": "2025-02-18T07:28:51",
"upload_time_iso_8601": "2025-02-18T07:28:51.923350Z",
"url": "https://files.pythonhosted.org/packages/6b/95/4055d618e40adac143c6a4f3e014e1c8905ebfa272675f1be64894cbe9cb/prefligit-0.0.9-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "caa44c50e673ebe201c09df30bf3f99f3f2b7ed6b9e81f4a4b7e170185b50c37",
"md5": "e307eacc3ca7162d45eb3fdfe38e5dba",
"sha256": "7a5c4b55af26f7568a780a2834b47950de964515680bc4eb9b918b3e064e07f1"
},
"downloads": -1,
"filename": "prefligit-0.0.9.tar.gz",
"has_sig": false,
"md5_digest": "e307eacc3ca7162d45eb3fdfe38e5dba",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 107313,
"upload_time": "2025-02-18T07:28:53",
"upload_time_iso_8601": "2025-02-18T07:28:53.762226Z",
"url": "https://files.pythonhosted.org/packages/ca/a4/4c50e673ebe201c09df30bf3f99f3f2b7ed6b9e81f4a4b7e170185b50c37/prefligit-0.0.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-18 07:28:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "j178",
"github_project": "prefligit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "prefligit"
}