Skip to main content

bappa-check

CI License: MIT

A fast, zero-config sanity check for your staged files — merge-conflict markers, hardcoded secrets, oversized files, syntax errors, debug leftovers, and more. Pass, and you get blessed by an animated ASCII Ganesha with a green BAPPA APPROVED badge. Fail, and the commit is blocked until you fix it.

                     ..
                    -===
                .::-==+=--:.
              :-----:.::-----.
             ----:::-::-::----:
            -=--:--=++++=-------
           .-=:-=++++++++++=-:=-.
            :-**=:.      .:=**-.
        -#%%%#**:.  .::.  .:#*#%%%#.
      =#**#++*%*-***----***=*%*++#*##:
        --*+=+#*:+*=----=*+:+#+=+*-
         ==*+=#*.::......-:.*#=+*=-
          :=***#+*-......-*+#***=.
            -+++=-..::-:.:-=**+-
              =  .+:-===-*:  +
                   ====-:
                   -+*+-:   ..
                    =####*##*#*-
                       :-.  :-=*.
                             +=
+----------------------------------------+
| BAPPA APPROVED -- Ganpati Bappa Morya! |
+----------------------------------------+

Install

Not yet on PyPI (soon — track issues or just try the command below, it'll start working the moment it's published). Until then, install straight from GitHub:

pip install git+https://github.com/ASHinarretable/bappa-check.git

Once published:

pip install bappa-check

Usage

Run it anytime — by default it checks whatever you've git added:

bappa-check
bappa-check                 # check staged files (default)
bappa-check --all           # check every tracked file in the repo
bappa-check path/ file.py   # check specific files/directories
bappa-check --strict        # treat warnings as failures too
bappa-check --no-anim       # skip the animation, print static art only
bappa-check --install-hook  # wire it up as this repo's git pre-commit hook
bappa-check --uninstall-hook
bappa-check --version

Exit code is 0 on success, 1 on failure — so it plugs straight into git commit as a gate. Set BAPPA_NO_ANIM=1 to always skip the animation (handy in CI or over a slow SSH session); it also auto-skips whenever output isn't a real terminal.

What it checks

Every check runs against your staged files (or whatever paths you pass) with zero configuration — no matter what language your repo is in.

Check Severity What it catches
conflict-markers fail Unresolved <<<<<<< / ======= / >>>>>>> from a bad merge
secrets fail AWS keys, private key blocks, GitHub/Slack tokens, hardcoded password = / api_key = assignments
large-files fail Any staged file over 5 MB
syntax fail Broken .py / .json / .toml / .yaml
debug-leftovers warn Stray breakpoint(), pdb.set_trace(), console.log(, debugger;
whitespace warn Trailing whitespace, missing newline at end of file
todo-fixme info Reports TODO/FIXME markers — never blocks
external-lint warn Runs ruff/eslint on staged files if they're already on your PATH — optional, never required

fail blocks the commit. warn doesn't, unless you pass --strict. info never blocks.

A finding you want to allow deliberately can be suppressed inline with a trailing # bappa: ignore comment (currently supported by the secrets check).

Using it as a git hook

Option A — quick, this repo only:

bappa-check --install-hook

Writes .git/hooks/pre-commit. Refuses to overwrite a hook it didn't create itself — if you've already got one, add a line calling bappa-check to it by hand instead. Undo with bappa-check --uninstall-hook.

Option B — the pre-commit framework (recommended if your team already uses it):

Add this to your project's .pre-commit-config.yaml:

repos:
  - repo: https://github.com/ASHinarretable/bappa-check
    rev: v0.1.0 # pin to a released tag
    hooks:
      - id: bappa-check

Then:

pre-commit install

pre-commit builds an isolated environment for the hook automatically — nobody on your team needs to pip install anything themselves.

Development

git clone https://github.com/ASHinarretable/bappa-check.git
cd bappa-check
python -m venv .venv
.venv\Scripts\Activate.ps1   # or: source .venv/bin/activate on macOS/Linux
pip install -e ".[dev]"
pytest -q            # run the test suite
ruff check src tests # lint
pre-commit run --all-files --verbose  # dogfood the hook on this repo itself

CI runs the full suite across Ubuntu/macOS/Windows on Python 3.9 and 3.12 on every push.

License

MIT

Metadata

Release files for bappa-check 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bappa-check 0.1.0
File Size Uploaded Provenance
bappa_check-0.1.0.tar.gz 27.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bappa-check 0.1.0
File Interpreter ABI Platform
bappa_check-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.4 kB

Release files / bappa_check-0.1.0.tar.gz

Download URL bappa_check-0.1.0.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f5494e37f30ee73884f6043847fb0736f52dd7a7b53770754898e705482fec7d
BLAKE2b-256 checksum
How to use checksums
386b3fc232c33c311ee511c7b5000e275921f6798c977969c790c7d599500476
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / bappa_check-0.1.0-py3-none-any.whl

Download URL bappa_check-0.1.0-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40896d3abf7de6b87dbbd3145d0bca39a43712d1cbfe8fdb75a0e51eca965a74
BLAKE2b-256 checksum
How to use checksums
96d0cc45170ec86536d5feb981a9b948b06de013ae0b1fdce03f241bbbbf9c7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Security for bappa-check 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bappa_check-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page