Metadata-Version: 2.3
Name: pre-commit-tool
Version: 0.1.7
Summary: Very simple human-friendlier wrapper around pre-commit
Project-URL: Repository, https://github.com/jmknoble/pre-commit-tool
Author-email: jmknoble <jmknoble@pobox.com>
License: MIT License
        
        Copyright (c) 2024 jmknoble
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: cli,git,pre-commit
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# pre-commit-tool

A simple wrapper around some [pre-commit][] commands that remembers some needed arguments for you,
and that provides some abbreviations and friendly aliases.

[begintoc]: #

## Contents

- [Commands](#commands)
- [Installation](#installation)
- [Contributing](#contributing)
- [References](#references)

[endtoc]: # (Generated by mark-toc pre-commit hook)


## Commands

- **help** - Print help
- **install** - Install pre-commit hooks using `pre-commit install-hooks ...`
- **run** - Run pre-commit hooks using `pre-commit run-hooks ...`
- **sync** - Sync and garbage-collect pre-commit hooks
- **update** - Update pre-commit hooks using `pre-commit autoupdate ...`
- **upgrade** - Alias for `update`
- **use** - "Use" (install) the pre-commit tool with `uv tool install ...`
- **validate** - Validate the pre-commit config file

Any command can be given with or without a leading `--` (that is, `--help` is the same as `help`).

Most commands take additional arguments that get passed on to `pre-commit`.

Most commands require a '.pre-commit-config.yaml' to be present.


## Installation

Use your favorite way of installing Python packages. It's really easy with [uv][uv-install]):

    uv tool install pre-commit-tool
    uvx pre-commit-tool help

You can also add this package as a development dependency to a `uv`-managed project:

    uv add --dev pre-commit-tool
    uv run pre-commit-tool help


## Contributing

This project uses:

- `uv` for project create/init, dependency management, virtual environment management
- `ruff` for linting and auto-formatting
- `pre-commit` for automatically running linting/formatting/etc. at pre-commit time
- `bumpver` for automatically bumping version numbers (and tagging, etc.)
- `editorconfig` for setting indent, end-of-line, etc. for many editors/IDEs


## References

- **bumpver**       ( [GitHub][bumpver-src] | [PyPI][bumpver-pypi] )
- **editorconfig**  ( [Home][editorconfig] | [Config][editorconfig-config] )
- **pre-commit**    ( [Home][pre-commit] | [GitHub][pre-commit-src] | [Config][pre-commit-config] )
- **ruff**          ( [GitHub][ruff-src] | [Documentation][ruff-doc] )
- **uv**            ( [Install][uv-install] | [GitHub][uv-src] | [Documentation][uv-doc] )

 [bumpver-src]: https://github.com/mbarkhau/bumpver
 [bumpver-pypi]: https://pypi.org/project/bumpver/

 [editorconfig]: https://editorconfig.org/
 [editorconfig-config]: .editorconfig

 [pre-commit]: https://pre-commit.com/
 [pre-commit-src]: https://github.com/pre-commit/pre-commit
 [pre-commit-config]: .pre-commit-config.yaml

 [ruff-src]: https://github.com/astral-sh/ruff
 [ruff-doc]: https://docs.astral.sh/ruff

 [uv-install]: https://docs.astral.sh/uv/getting-started/installation
 [uv-src]: https://github.com/astral-sh/uv
 [uv-doc]: https://docs.astral.sh/uv
