←back to thread

136 points d-yoda | 1 comments | | HN request time: 0s | 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
derekcheng08 ◴[] No.45482457[source]
This is pretty awesome! If it's built on tree-sitter, is it fair to assume it's generalizable across languages?
replies(2): >>45482618 #>>45489649 #
1. aitchnyu ◴[] No.45489649[source]
Tangential, tree-sitter also allowed Aider, AI coding asisstant to exist and allow LLMs to work on codebases above their context limit.

https://aider.chat/docs/recordings/tree-sitter-language-pack...