pyscn - Python Code Quality Analyzer pyscn is a code quality analyzer for Python vibe coders. Building with Cursor, Claude, or ChatGPT? pyscn performs structural analysis to keep your codebase maintainable. Quick Start # Run analysis without installation uvx pyscn analyze . # or pipx run pyscn analyze . Demo pyscn_20251005.mov Features ๐ CFG-based dead code detection โ Find unreachable code after exhaustive if-elif-else chains โ Find unreachable code after exhaustive if-elif-else chains ๐ Clone detection with APTED + LSH โ Identify refactoring opportunities with tree edit distance โ Identify refactoring opportunities with tree edit distance ๐ Coupling metrics (CBO) โ Track architecture quality and module dependencies โ Track architecture quality and module dependencies ๐ Cyclomatic complexity analysis โ Spot functions that need breaking down 100,000+ lines/sec โข Built with Go + tree-sitter Common Commands pyscn analyze Run comprehensive analysis with HTML report pyscn analyze . # All analyses with HTML report pyscn analyze --json . # Generate JSON report pyscn analyze --select complexity . # Only complexity analysis pyscn analyze --select deps . # Only dependency analysis pyscn analyze --select complexity,deps,deadcode . # Multiple analyses pyscn check Fast CI-friendly quality gate pyscn check . # Quick pass/fail check pyscn check --max-complexity 15 . # Custom thresholds pyscn init Create configuration file pyscn init # Generate .pyscn.toml ๐ก Run pyscn --help or pyscn <command> --help for complete options Configuration Create a .pyscn.toml file or add [tool.pyscn] to your pyproject.toml : # .pyscn.toml [ complexity ] max_complexity = 15 [ dead_code ] min_severity = " warning " [ output ] directory = " reports " โ๏ธ Run pyscn init to generate a full configuration file with all available options Installation # Install with pipx (recommended) pipx install pyscn # Or run directly with uvx uvx pyscn Alternative installation methods Build from source git clone https://git...
First seen: 2025-10-05 15:01
Last seen: 2025-10-05 20:03