Skip to main content

catchdev

Tells you what your AI coding agent just broke.

catch flags a real 4-month Flask regression in 2 seconds

That GIF is real: it's catch flagging the SECRET_KEY_FALLBACKS session bug that lived in Flask 3.1.0 for ~4 months before anyone noticed. catch ran the affected tests, re-ran the failures against the pre-diff baseline, and pointed at the exact regression. Reproduce it yourself.

10-second install

pip install catchdev

Usage

cd some-ai-generated-project
# make some changes (or let an agent make them)
git add .
catch                 # check staged changes
catch --commit HEAD~1 # check the last commit
catch --all-tests     # run the full suite instead of affected tests
catch --skip-deps     # skip PyPI dependency risk checks
catch --fail-on-suspicious   # also block on suspicious (not just dangerous) deps
catch --output report.md     # write a markdown report (for PR comments)
echo $?               # 1 = problems found, 0 = clean

In a GitHub Actions PR, catch automatically diffs against origin/$GITHUB_BASE_REF instead of HEAD~1 (squash merges break HEAD~1).

How it works

  1. differ — parses git diff --unified=0 into changed files, changed line numbers, and newly added imports / dependency entries.
  2. mapper — builds (and caches in .catch_cache.json) an AST import graph of the project, then walks it backwards from each changed file until it hits test files. When possible it narrows down to the specific test functions that call the functions your diff touched.
  3. runner — runs the affected tests with pytest, then re-runs any failures against the pre-diff baseline in a temporary git worktree to distinguish NEW failures from pre-existing ones.
  4. depcheck — queries PyPI for every new dependency: does it exist, how old is it, how many downloads, and did you mean a similarly-named popular package? (Hallucinated package names — "slopsquatting" — are a real supply chain risk with AI-generated code.)
  5. report — pretty terminal output and an exit code you can wire into a hook or CI.

Why not just...?

catch LLM review (CodeRabbit etc.) static gates (dont-break, Solumbe)
Actually runs your tests ✓ ✗ ✗
Tells new failures from pre-existing ✓ ✗ ✗
Deterministic (same answer every run) ✓ ✗ ✓
Catches hallucinated packages ✓ (live registry check) unreliable partial
Cost per run free tokens/subscription free
Works as a hard CI gate ✓ exit code ✗ ✓

Use it everywhere

GitHub Action (posts the report as a PR comment):

# .github/workflows/catch.yml
name: Catch
on: [pull_request]
jobs:
  catch:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      pull-requests: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - run: pip install -e .
      - uses: yourusername/catchdev@v1

catch runs catch on its own PRs — see .github/workflows/catch.yml in this repo.

Pre-commit / pre-push hook — add to .pre-commit-config.yaml:

- repo: https://github.com/yourusername/catchdev
  rev: v0.1.0
  hooks:
    - id: catch

Running tests on every commit annoys people; pre-push is the sweet spot:

    - id: catch
      stages: [pre-push]

Claude Code skill — your agent checks its own work before committing. Copy skills/catch/SKILL.md into ~/.claude/skills/catch/ (or drop the packaged catch.skill from Releases into your skills directory). After that, Claude runs catch --staged before every commit and fixes what it breaks instead of shipping it.

Exit codes

  • 0 — all affected tests pass, no dangerous dependencies
  • 1 — new test failures OR dangerous dependencies
  • 2 — catch itself couldn't run (not a git repo, etc.)

License

MIT

Metadata

Release files for catchdev 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 catchdev 0.1.0
File Size Uploaded Provenance Actions
catchdev-0.1.0.tar.gz 21.0 kB Without provenance Details for catchdev-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 40.6 kB

Release files / catchdev-0.1.0.tar.gz

Download URL catchdev-0.1.0.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
47562ac0ff4e28a79ef2523990be4d83dc0681cdb40ec885a54c98513a09bcc2
BLAKE2b-256 checksum
How to use checksums
39087a78c838cfeb2aa6eaf7c04b56cfd2af6ac04d421cfb71a0981ed8613a5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

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

Download URL catchdev-0.1.0-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9489743fd571b598d1ed8df9fa23e4e7c96eb507c2540239db983e1c2ed8f8fa
BLAKE2b-256 checksum
How to use checksums
8eef5c0925b46bc59b129704a63ffc9aba7700dd9341e1de2040640886a38cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for catchdev 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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