←back to thread

136 points d-yoda | 1 comments | | HN request time: 0.209s | source

Hi HN! I built pyscn for Python developers in the vibe coding era. If you're using Cursor, Claude, or ChatGPT to ship Python code fast, you know the feeling: features work, tests pass, but the codebase feels... messy.

Common vibe coding artifacts:

• Code duplication (from copy-pasted snippets)

• Dead code from quick iterations

• Over-engineered solutions for simple problems

• Inconsistent patterns across modules

pyscn performs structural analysis:

• APTED tree edit distance + LSH

• Control-Flow Graph (CFG) analysis

• Coupling Between Objects (CBO)

• Cyclomatic Complexity

Try it without installation:

  uvx pyscn analyze .          # Using uv (fastest)
  pipx run pyscn analyze .     # Using pipx
  (Or install: pip install pyscn)
Built with Go + tree-sitter. Happy to dive into the implementation details!
Show context
ktrnka ◴[] No.45486252[source]
Looks good to me! The status bar did something weird on my codebase in which 2% was really 100% so it looked like it was gonna take hours but only took a minute or so.

I'll try hooking it into my refactor/cleanup workflow with copilot and see how it works as grounding.

replies(1): >>45490638 #
1. d-yoda ◴[] No.45490638[source]
Thanks for trying it out! For the progress bar bug, would you mind opening a GitHub issue with details? That'll help us track it down.

Great idea using it as grounding for AI-assisted refactoring! Let us know how that workflow goes.