←back to thread

136 points d-yoda | 1 comments | | HN request time: 0.207s | 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
scosman ◴[] No.45482779[source]
this should be a MCP server the agent can use and optimize on

I have a MCP server that wraps developer tool CLIs (linting, tests, etc), but this would need a textual report instead of HTML.

https://github.com/scosman/hooks_mcp

replies(4): >>45482803 #>>45483146 #>>45483195 #>>45483685 #
1. daydreamer9000 ◴[] No.45483195[source]
Coding agents usually have longer timeouts for bash commands than MCP server calls. So depending on how much time this tool takes, using a CLI by default could be more robust.