Show HN: Pyscn – Python code quality analyzer for vibe coders (github.com)

🤖 AI Summary
Pyscn is a new open-source Python code-quality analyzer (Show HN) built in Go with tree-sitter that targets fast, maintainable codebases—especially helpful for teams using AI-assisted tools like Cursor, Claude, or ChatGPT. It performs multiple static analyses (configurable per-run) including CFG-based dead-code detection that spots unreachable branches after exhaustive if/elif/else chains, cyclomatic complexity scoring, coupling metrics (CBO), and clone detection using tree edit distance (APTED) combined with LSH for scalable similarity search. Outputs include HTML and JSON reports, a fast CI-friendly check command with customizable thresholds, and a generated .pyscn.toml (or [tool.pyscn] in pyproject.toml) for project configuration. Reported throughput is 100k+ lines/sec. Why it matters: AI-assisted coding can accelerate delivery but also introduce duplicated, overly complex, or tightly coupled code; pyscn focuses on structural, AST-level analyses to surface refactor opportunities and architectural risks early. The combination of tree-sitter parsing, APTED+LSH clone detection, and CFG analysis gives more precise insights than token-based linters alone, while Go-based performance and pipx/uvx installation make it CI-friendly. MIT-licensed and extensible, pyscn is positioned as a pragmatic tool to enforce quality gates and guide maintainability in fast-moving ML/AI codebases.
Loading comments...
loading comments...