Skip to content

Installation

Add to .pre-commit-config.yaml:

repos:
  - repo: https://github.com/solaegis/pre-commit-glassworm
    rev: v0.1.0  # pin to tag for reproducible installs
    hooks:
      - id: glassworm

Then install the hook:

pre-commit install

The hook runs automatically when you commit. It only scans staged files, so it stays fast.

Try before installing

Test the hook on your repo without installing:

pre-commit try-repo . glassworm --all-files

Using prek

If you prefer prek instead of pre-commit, define a prek.toml file:

[[repos]]
repo = "https://github.com/solaegis/pre-commit-glassworm"
rev = "v0.1.0"  # pin to tag for reproducible installs
hooks = [{ id = "glassworm" }]

Then run prek install. Your existing .pre-commit-config.yaml also works with prek unchanged (no config change needed).

Option 2: Standalone CLI

Install with uv:

uv add pre-commit-glassworm

Or with pip:

pip install pre-commit-glassworm

Then run:

glassworm path/to/file.py path/to/dir/

Or pipe from stdin:

cat somefile.js | glassworm

Option 3: Dev dependency only

For projects that want the CLI but not the pre-commit hook:

uv add --dev pre-commit-glassworm

Requirements