Skip to main content

Very simple human-friendlier wrapper around pre-commit

Project description

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.

Contents

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 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pre_commit_tool-0.1.3.tar.gz (11.4 kB view hashes)

Uploaded Source

Built Distribution

pre_commit_tool-0.1.3-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page