Skip to main content

Surgical code-sanitization engine that turns vibe-coded Python into clean, professional code.

Project description

VibeCheck

Precision cleaning for the professional engineer.

VibeCheck is a surgical code-sanitization engine. It transforms "vibe-coded" (AI-assisted or hastily written) Python into clean, professional source code by removing conversational filler, redundant documentation, and low-effort naming — without changing program behavior.

Directory support, rich reports, and a conservative approach keep it safe for real codebases. Pro tier (separate binary) adds unlimited scale and extras.

Key Features

  • AI Reflective Stripper: Removes the #1 AI tell — meta comments like "Note that I've implemented...", "Hope this helps!", "As you can see...".
  • Redundant Docstring Cleaner (AST-Powered): Deletes docstrings that merely echo the function or class name (e.g. def get_data(): """get data""").
  • Naming Analyzer: Detects low-effort variables (data, res, tmp, result, obj...) and reports them in a dedicated table.
  • Metadata-Aware Pipeline: Strategies populate rich VibeReport metadata (counts, issues list) for detailed analysis and "Boy Scout" recommendations.
  • Cognitive Load Index: Multi-factor score (cyclomatic complexity via radon + slop density + nesting).
  • Structural Normalizer: Collapses excessive blank lines and trims erratic whitespace.
  • Boy Scout Recommendations: Actionable clean-code advice printed when issues are found.
  • Pro tier: The separate vibecheck-pro binary (via Lemon Squeezy) unlocks --aggressive, full ruff format, --json-report, unlimited batch sizes, and more. The free pip package has soft limits.

Before & After

Before

# vibes
# Note that i've implemented the logic below to handle the response
def get_data(data):
    """get data"""
    # lol slop
    res = data
    return res

After (cleaned by VibeCheck)

def get_data(data):
    res = data
    return res

Report:

  • Slop Indicators Removed: 3
  • Structural Improvements: 1 (redundant docstring)
  • Suspicious Naming: data, res flagged (see table below)

Names are reported by default; pass --fix-names to auto-rename via AST transformation.

Advanced Metrics & Reporting

VibeCheck computes a Cognitive Load Index (0-100) using:

  • Cyclomatic complexity (via radon)
  • Slop / vibe-keyword density
  • Structural nesting depth

It produces a rich VibeReport consumed by the CLI for tables and recommendations.

Example report (with the new Naming table):

      Clarity Analysis: my_code.py        
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Metric               ┃ Value        ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ Original Vibe        │ Chaotic      │
│ Clean Vibe           │ Stable       │
│ Slop Indicators Removed │ 3          │
│ Structural Improvements │ 1          │
│ Cognitive Load Index │ 42.0         │
└──────────────────────┴──────────────┘

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Suspicious Naming Detected ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ Suspicious variable: res   │
│ Suspicious variable: data  │
└────────────────────────────┘

┌────────────────────────────────────────────┐
│ Boy Scout Recommendation                   │
├────────────────────────────────────────────┤
│ Suspicious variable/function names         │
│ detected. Use more descriptive names...    │
└────────────────────────────────────────────┘

See vibecheck/core/interfaces.py for the full VibeReport dataclass.

Usage

# Analyze only (no writes)
vibecheck my_code.py --report-only
# or explicitly
vibecheck clean my_code.py --report-only

# Clean the file in place (creates no backup — use git)
vibecheck my_code.py

# Auto-rename suspicious variables/functions
vibecheck src/ --fix-names

# Only clean files modified since the last commit (git-aware)
vibecheck --git

# Git-stash dirty state first then clean (safety net)
vibecheck src/ --backup

# Install a pre-commit hook to clean staged .py files
vibecheck install-hooks

The primary command is clean <path> (defaults to .). Both files and directories (recursive) are supported. Use --report-only for analysis without edits. Always commit or backup first.

Pro features (Pro binary)

The free package (pip install slopbuster) is fully functional for most use. Pro is delivered as a standalone binary via Lemon Squeezy (no key, just drop vibecheck-pro in your PATH).

# With the Pro binary in PATH (name auto-enables full features)
vibecheck-pro src/ --aggressive --json-report report.json

See vibecheck clean --help (or vibecheck-pro ...) for options. Pro removes the free tier's 10-file batch soft limit and enables aggressive patterns + ruff format + JSON export.

Example Report

      Clarity Analysis: my_code.py        
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Metric               ┃ Value        ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ Original Vibe        │ Chaotic      │
│ Clean Vibe           │ Professional │
│ Slop Indicators      │ 14           │
│ Cognitive Load Index │ 4.2          │
└──────────────────────┴──────────────┘

Installation

From PyPI (recommended):

pip install slopbuster
# or
uv pip install slopbuster

For development (uv recommended):

git clone ...
cd vibecheck_repo
uv sync --dev   # or uv pip install -e . -r <(uv pip compile --group dev ...)

Check version:

vibecheck --version

Free vs Pro

VibeCheck core is free and open source (MIT) on PyPI.

  • Free (pip install slopbuster): Full pipeline, reports, naming fixes, git integration, hooks, etc. Soft limit: max 10 files per batch/directory operation (single files always allowed). When the limit is hit it prints an upgrade link.
  • Pro (commercial binary): Unlimited files, --aggressive patterns, post-clean ruff format, --json-report, and future extras. Distributed as a standalone executable via Lemon Squeezy (no PyPI, no keys). Just place vibecheck-pro in PATH — the binary name auto-enables Pro mode.

Purchase / download the Pro binary at the Lemon Squeezy store. After purchase Lemon Squeezy emails the direct download link.

The vibecheck-pro/ build configuration lives alongside the free source (see vibecheck-pro.spec + scripts/build_pro_binary.sh).

Pro Tier

Pro features (available in the Lemon Squeezy binary):

  • Unlimited batch/directory size (free has 10-file soft cap)
  • --aggressive: Additional patterns (todo/hack/temp etc.)
  • Post-clean ruff format (free only does ruff check --fix)
  • --json-report path.json: Structured output for CI/tooling

Example (once the Pro binary is in PATH):

vibecheck-pro dirty/ --json-report report.json --aggressive

Feedback and feature requests are very welcome.


Donate

If VibeCheck saves you time and you want to say thanks:

All donations fund further development of VibeCheck and sibling projects.


License

MIT

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

slopbuster-0.5.2.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slopbuster-0.5.2-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file slopbuster-0.5.2.tar.gz.

File metadata

  • Download URL: slopbuster-0.5.2.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for slopbuster-0.5.2.tar.gz
Algorithm Hash digest
SHA256 e67ffc5bdd5cbd6220fde7bad0a2dde694a0c4bb220eabdcf4313e5bbf62ccfb
MD5 13c32b6f2a248f85dbefe253eb98b14c
BLAKE2b-256 4100245e4b3d8e9484a0fca905cb7888fa6bbbb56d2a11a6ca12c245a7227bc1

See more details on using hashes here.

File details

Details for the file slopbuster-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: slopbuster-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for slopbuster-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc0d7b8ab9a22292e76a7b0fe6d273000076cc0ce83d24d2ffccacd85b0d703b
MD5 bd3c83c43f7c0eeefa594fb2e772cf64
BLAKE2b-256 9b5b6319e43bd6f5f64c5954f89ae6da40f39ccef60b227a96f19f6fe1cc3fb5

See more details on using hashes here.

Supported by

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