# pre-commit-rs
![Development Status](https://img.shields.io/badge/Development-Early_Stage-yellowgreen)
[![CI](https://github.com/j178/pre-commit-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/j178/pre-commit-rs/actions/workflows/ci.yml)
A reimplementation of the [pre-commit](https://pre-commit.com/) tool in Rust, providing a faster and dependency-free alternative.
It aims to be a drop-in replacement for the original tool while also providing some more advanced 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.
## 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.
- (TODO) Built-in support for monorepos.
- (TODO) Built-in implementation of some common hooks.
- (TODO) Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python tools and environments.
## Installation
### Standalone installer
`pre-commit-rs` 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/pre-commit-rs/releases/download/v0.0.5/pre-commit-rs-installer.sh | sh
# On Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/pre-commit-rs/releases/download/v0.0.5/pre-commit-rs-installer.ps1 | iex"
```
### PyPI
`pre-commit-rs` is published as Python binary wheel to PyPI under the name `pre-commit-rusty`,
you can install it using `pip`, `uv` (recommended), or `pipx`:
```console
pip install pre-commit-rusty
# or
uv tool install pre-commit-rusty
# or
pipx install pre-commit-rusty
```
### Homebrew
```console
brew install j178/tap/pre-commit-rs
```
### Cargo
Build from source using Cargo:
```console
cargo install --locked pre-commit-rs
```
Install from the binary directly using `cargo binstall`:
```console
cargo binstall pre-commit-rs
```
### GitHub Releases
`pre-commit-rs` release artifacts can be downloaded directly from the [GitHub releases](https://github.com/j178/pre-commit-rs/releases).
## Usage
> [!NOTE]
> The binary executable is named `pre-commit` (or `pre-commit.exe` on Windows) - without the `-rs` suffix. It should be available in your `PATH` after installation.
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/pre-commit-rs",
"name": "pre-commit-rusty",
"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/0b/60/65e4f431338c458697efcc6f606758bf46dc3c2a452a1d932d2e96d288e2/pre_commit_rusty-0.0.5.tar.gz",
"platform": null,
"description": "# pre-commit-rs\n\n![Development Status](https://img.shields.io/badge/Development-Early_Stage-yellowgreen)\n[![CI](https://github.com/j178/pre-commit-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/j178/pre-commit-rs/actions/workflows/ci.yml)\n\nA reimplementation of the [pre-commit](https://pre-commit.com/) tool in Rust, providing a faster and dependency-free alternative.\nIt aims to be a drop-in replacement for the original tool while also providing some more advanced 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## 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- (TODO) Built-in support for monorepos.\n- (TODO) Built-in implementation of some common hooks.\n- (TODO) Integration with [`uv`](https://github.com/astral-sh/uv) for managing Python tools and environments.\n\n## Installation\n\n### Standalone installer\n\n`pre-commit-rs` 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/pre-commit-rs/releases/download/v0.0.5/pre-commit-rs-installer.sh | sh\n\n# On Windows\npowershell -ExecutionPolicy ByPass -c \"irm https://github.com/j178/pre-commit-rs/releases/download/v0.0.5/pre-commit-rs-installer.ps1 | iex\"\n```\n\n### PyPI\n\n`pre-commit-rs` is published as Python binary wheel to PyPI under the name `pre-commit-rusty`,\nyou can install it using `pip`, `uv` (recommended), or `pipx`:\n\n```console\npip install pre-commit-rusty\n\n# or\n\nuv tool install pre-commit-rusty\n\n# or\n\npipx install pre-commit-rusty\n```\n\n### Homebrew\n\n```console\nbrew install j178/tap/pre-commit-rs\n```\n\n### Cargo\n\nBuild from source using Cargo:\n\n```console\ncargo install --locked pre-commit-rs\n```\n\nInstall from the binary directly using `cargo binstall`:\n\n```console\ncargo binstall pre-commit-rs\n```\n\n### GitHub Releases\n\n`pre-commit-rs` release artifacts can be downloaded directly from the [GitHub releases](https://github.com/j178/pre-commit-rs/releases).\n\n## Usage\n\n> [!NOTE]\n> The binary executable is named `pre-commit` (or `pre-commit.exe` on Windows) - without the `-rs` suffix. It should be available in your `PATH` after installation.\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.5",
"project_urls": {
"Changelog": "https://github.com/j178/pre-commit-rs/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/j178/pre-commit-rs",
"Releases": "https://github.com/j178/pre-commit-rs/releases",
"Repository": "https://github.com/j178/pre-commit-rs"
},
"split_keywords": [
"pre-commit",
" git",
" hooks"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "efdf0f1b52bc7b4d71d1254500fe97b0c089c9387f4744034592925f226efeea",
"md5": "9a28bf63db9db74d570043e6581859a0",
"sha256": "c7a32995aff8de695b112f94ecad94d7496b82de548d7be5bd5b7487b03f19b6"
},
"downloads": -1,
"filename": "pre_commit_rusty-0.0.5-py3-none-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "9a28bf63db9db74d570043e6581859a0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4962008,
"upload_time": "2024-11-21T15:04:15",
"upload_time_iso_8601": "2024-11-21T15:04:15.873673Z",
"url": "https://files.pythonhosted.org/packages/ef/df/0f1b52bc7b4d71d1254500fe97b0c089c9387f4744034592925f226efeea/pre_commit_rusty-0.0.5-py3-none-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e16644e2a729a462f32f7330c88a2e1027beb79c8bbd20e247e07b46893ad2a9",
"md5": "e0a304af75ba909e0764d5f7ff167c90",
"sha256": "d5356fefb87364ac0c19ac96819f864c25ed6ac99a73123c0f89860510ded75f"
},
"downloads": -1,
"filename": "pre_commit_rusty-0.0.5-py3-none-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "e0a304af75ba909e0764d5f7ff167c90",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4709088,
"upload_time": "2024-11-21T15:04:18",
"upload_time_iso_8601": "2024-11-21T15:04:18.430664Z",
"url": "https://files.pythonhosted.org/packages/e1/66/44e2a729a462f32f7330c88a2e1027beb79c8bbd20e247e07b46893ad2a9/pre_commit_rusty-0.0.5-py3-none-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cf014af8afb75d034a8eea2f81834500e3174a771bb84c6cfbd0428c995fff4f",
"md5": "736a56e4cf0f63f537a3652a0584e0d7",
"sha256": "147e48064aa6ca1747df0575c2b63cf1b86b20ec3e361ae1994d319932045e9d"
},
"downloads": -1,
"filename": "pre_commit_rusty-0.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "736a56e4cf0f63f537a3652a0584e0d7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5377788,
"upload_time": "2024-11-21T15:04:19",
"upload_time_iso_8601": "2024-11-21T15:04:19.801557Z",
"url": "https://files.pythonhosted.org/packages/cf/01/4af8afb75d034a8eea2f81834500e3174a771bb84c6cfbd0428c995fff4f/pre_commit_rusty-0.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a229c88b0c932c18119949d7cbb862da85b3447d4fc9f12cb5df1bfa48240f8f",
"md5": "f3b36c40ef4952fd5c0356630be77337",
"sha256": "adb122648de257b0d0ae0819719e7e55df1573559ead6a302b3fb5b3a1dd2502"
},
"downloads": -1,
"filename": "pre_commit_rusty-0.0.5-py3-none-win_amd64.whl",
"has_sig": false,
"md5_digest": "f3b36c40ef4952fd5c0356630be77337",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4443557,
"upload_time": "2024-11-21T15:04:21",
"upload_time_iso_8601": "2024-11-21T15:04:21.789105Z",
"url": "https://files.pythonhosted.org/packages/a2/29/c88b0c932c18119949d7cbb862da85b3447d4fc9f12cb5df1bfa48240f8f/pre_commit_rusty-0.0.5-py3-none-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0b6065e4f431338c458697efcc6f606758bf46dc3c2a452a1d932d2e96d288e2",
"md5": "680eb9358b8b80ad94be09f213218420",
"sha256": "bd9eed6d7ddd719920119e4079598da3faf3b0dcc68acde30224f9c1341f1157"
},
"downloads": -1,
"filename": "pre_commit_rusty-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "680eb9358b8b80ad94be09f213218420",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 92811,
"upload_time": "2024-11-21T15:04:23",
"upload_time_iso_8601": "2024-11-21T15:04:23.803821Z",
"url": "https://files.pythonhosted.org/packages/0b/60/65e4f431338c458697efcc6f606758bf46dc3c2a452a1d932d2e96d288e2/pre_commit_rusty-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-21 15:04:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "j178",
"github_project": "pre-commit-rs",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pre-commit-rusty"
}