# prefligit
![Development Status](https://img.shields.io/badge/Development-Early_Stage-yellowgreen)
[![CI](https://github.com/j178/prefligit/actions/workflows/ci.yml/badge.svg)](https://github.com/j178/prefligit/actions/workflows/ci.yml)
<img width="665" alt="prefligit" src="https://github.com/user-attachments/assets/51b0e80e-07a2-441e-9c7c-9efa62f9a44f">
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
### Standalone installer
`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.7/prefligit-installer.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prefligit/releases/download/v0.0.7/prefligit-installer.ps1 | iex"
```
### PyPI
`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
```
### Homebrew
```console
brew install j178/tap/prefligit
```
### Cargo
Build from source using Cargo:
```console
cargo install --locked prefligit
```
Install from the binary directly using `cargo binstall`:
```console
cargo binstall prefligit
```
### GitHub Releases
`prefligit` release artifacts can be downloaded directly from the [GitHub releases](https://github.com/j178/prefligit/releases).
## Usage
This tool is designed to be a drop-in replacement 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/d0/e2/85c314cb704fd60488fe04dda791b1f9e87942d8d41891508ab2ce7a8f64/prefligit-0.0.7.tar.gz",
"platform": null,
"description": "# prefligit\n\n![Development Status](https://img.shields.io/badge/Development-Early_Stage-yellowgreen)\n[![CI](https://github.com/j178/prefligit/actions/workflows/ci.yml/badge.svg)](https://github.com/j178/prefligit/actions/workflows/ci.yml)\n\n<img width=\"665\" alt=\"prefligit\" src=\"https://github.com/user-attachments/assets/51b0e80e-07a2-441e-9c7c-9efa62f9a44f\">\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### Standalone installer\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.7/prefligit-installer.sh | sh\n\n# On Windows\npowershell -ExecutionPolicy ByPass -c \"irm https://github.com/j178/prefligit/releases/download/v0.0.7/prefligit-installer.ps1 | iex\"\n```\n\n### PyPI\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\n### Homebrew\n\n```console\nbrew install j178/tap/prefligit\n```\n\n### Cargo\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\n### GitHub Releases\n\n`prefligit` release artifacts can be downloaded directly from the [GitHub releases](https://github.com/j178/prefligit/releases).\n\n## Usage\n\nThis tool is designed to be a drop-in replacement 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.7",
"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": "c312b0d39dc74e2bb786ca28c95499a9f5d7d18ac771afae579839147472a054",
"md5": "22e454df224153d1962dbf8a25ec3a59",
"sha256": "a615562c2fba731c20a6f1915e4bf6d81f7bd4a879f183560a27f48dcb66e8f0"
},
"downloads": -1,
"filename": "prefligit-0.0.7-py3-none-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "22e454df224153d1962dbf8a25ec3a59",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5101032,
"upload_time": "2024-12-09T09:40:25",
"upload_time_iso_8601": "2024-12-09T09:40:25.930811Z",
"url": "https://files.pythonhosted.org/packages/c3/12/b0d39dc74e2bb786ca28c95499a9f5d7d18ac771afae579839147472a054/prefligit-0.0.7-py3-none-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "79c031f4e61529686535271c89be5cd3af25b10abad0956c4cc2b03fd922a8cf",
"md5": "f738050a7839c8f7ac2c564ac9a1e203",
"sha256": "3817001a6073ba16b10b9caf779ae72b5157a73bff1edc7cdb69399f59ac0638"
},
"downloads": -1,
"filename": "prefligit-0.0.7-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "f738050a7839c8f7ac2c564ac9a1e203",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4860170,
"upload_time": "2024-12-09T09:40:27",
"upload_time_iso_8601": "2024-12-09T09:40:27.461826Z",
"url": "https://files.pythonhosted.org/packages/79/c0/31f4e61529686535271c89be5cd3af25b10abad0956c4cc2b03fd922a8cf/prefligit-0.0.7-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fc7a1377cea9c5ac673104dadbe3ef246d1844cbdbe9d6b31833964ab781087a",
"md5": "ac6ee60588af2a03eb25bd87175c03ff",
"sha256": "1f33202737e1af5613e4eb2312fb9879209b0fe24dd90fd4abff1713c2523516"
},
"downloads": -1,
"filename": "prefligit-0.0.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "ac6ee60588af2a03eb25bd87175c03ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5520635,
"upload_time": "2024-12-09T09:40:29",
"upload_time_iso_8601": "2024-12-09T09:40:29.572615Z",
"url": "https://files.pythonhosted.org/packages/fc/7a/1377cea9c5ac673104dadbe3ef246d1844cbdbe9d6b31833964ab781087a/prefligit-0.0.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "29aed857e2751a41674d3748012e5db9103af416de7dfb787c9ad8a43c0f1e1b",
"md5": "c5040406d45f29aceab504644b533d90",
"sha256": "b47882592b6539032b96ebdbb9d670d75179a2c7c59a0560350cfe3e582eeb96"
},
"downloads": -1,
"filename": "prefligit-0.0.7-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "c5040406d45f29aceab504644b533d90",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4569547,
"upload_time": "2024-12-09T09:40:31",
"upload_time_iso_8601": "2024-12-09T09:40:31.684981Z",
"url": "https://files.pythonhosted.org/packages/29/ae/d857e2751a41674d3748012e5db9103af416de7dfb787c9ad8a43c0f1e1b/prefligit-0.0.7-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d0e285c314cb704fd60488fe04dda791b1f9e87942d8d41891508ab2ce7a8f64",
"md5": "7c91f819c2882e6b9d9f26776a42bf82",
"sha256": "0bea7398fa5134db6f4f5158610780455cb89da3b93fe059431f411f4eaaaa39"
},
"downloads": -1,
"filename": "prefligit-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "7c91f819c2882e6b9d9f26776a42bf82",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 102123,
"upload_time": "2024-12-09T09:40:33",
"upload_time_iso_8601": "2024-12-09T09:40:33.603115Z",
"url": "https://files.pythonhosted.org/packages/d0/e2/85c314cb704fd60488fe04dda791b1f9e87942d8d41891508ab2ce7a8f64/prefligit-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 09:40:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "j178",
"github_project": "prefligit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "prefligit"
}