Installation
Option 1: Pre-commit hook (recommended)
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:
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:
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:
Or with pip:
Then run:
Or pipe from stdin:
Option 3: Dev dependency only
For projects that want the CLI but not the pre-commit hook:
Requirements
- Python 3.11+
- pre-commit or prek (if using the hook)