{"id":32136769,"url":"https://github.com/ludo-technologies/pyscn","last_synced_at":"2026-04-08T21:03:34.577Z","repository":{"id":314375193,"uuid":"1033244511","full_name":"ludo-technologies/pyscn","owner":"ludo-technologies","description":"An Intelligent Python Code Quality Analyzer","archived":false,"fork":false,"pushed_at":"2026-04-07T11:58:20.000Z","size":2220,"stargazers_count":979,"open_issues_count":19,"forks_count":52,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-04-07T13:28:42.948Z","etag":null,"topics":["architecture-analysis","clone-detection","code-complexity","dead-code-detection","dependency-analysis","python","static-analysis"],"latest_commit_sha":null,"homepage":"https://pyscn.ludo-tech.org","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ludo-technologies.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-06T14:11:51.000Z","updated_at":"2026-04-07T12:07:31.000Z","dependencies_parsed_at":"2025-09-29T20:19:42.047Z","dependency_job_id":null,"html_url":"https://github.com/ludo-technologies/pyscn","commit_stats":null,"previous_names":["ludo-technologies/pyscn"],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/ludo-technologies/pyscn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludo-technologies%2Fpyscn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludo-technologies%2Fpyscn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludo-technologies%2Fpyscn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludo-technologies%2Fpyscn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ludo-technologies","download_url":"https://codeload.github.com/ludo-technologies/pyscn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludo-technologies%2Fpyscn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31573789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture-analysis","clone-detection","code-complexity","dead-code-detection","dependency-analysis","python","static-analysis"],"created_at":"2025-10-21T04:09:32.858Z","updated_at":"2026-04-08T21:03:34.544Z","avatar_url":"https://github.com/ludo-technologies.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/logo.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/logo-light.svg\"\u003e\n  \u003cimg alt=\"pyscn\" src=\"assets/logo-light.svg\" width=\"320\"\u003e\n\u003c/picture\u003e\n\n**A code quality analyzer for Python vibe coders.**\n\nBuilding with Cursor, Claude, or ChatGPT? pyscn performs structural analysis to keep your codebase maintainable.\n\n[![Article](https://img.shields.io/badge/dev.to-Article-0A0A0A?style=flat-square\u0026logo=dev.to)](https://dev.to/daisukeyoda/pyscn-the-code-quality-analyzer-for-vibe-coders-18hk)\n[![PyPI](https://img.shields.io/pypi/v/pyscn?style=flat-square\u0026logo=pypi)](https://pypi.org/project/pyscn/)\n[![Downloads](https://img.shields.io/pypi/dm/pyscn?style=flat-square\u0026logo=pypi\u0026label=downloads)](https://pypi.org/project/pyscn/)\n[![Go](https://img.shields.io/github/go-mod/go-version/ludo-technologies/pyscn?style=flat-square\u0026logo=go)](https://go.dev/)\n[![License](https://img.shields.io/github/license/ludo-technologies/pyscn?style=flat-square)](LICENSE)\n\n*Working with JavaScript/TypeScript? Check out [jscan](https://github.com/ludo-technologies/jscan)*\n\n\u003c/div\u003e\n\n## Quick Start\n\n```bash\n# Run analysis without installation\nuvx pyscn@latest analyze .\n# or\npipx run pyscn analyze .\n```\n\n## Demo\n\nhttps://github.com/user-attachments/assets/71d7a126-9c5e-4254-99f4-f2cdedd526ad\n\n## Features\n\n- 🔍 **CFG-based dead code detection** – Find unreachable code after exhaustive if-elif-else chains\n- 📋 **Multi-algorithm clone detection (Type 1-4)** – Identify refactoring opportunities with LSH acceleration\n- 🔗 **Coupling metrics (CBO)** – Track architecture quality and module dependencies\n- 📊 **Cyclomatic complexity analysis** – Spot functions that need breaking down\n\n**100,000+ lines/sec** • Built with Go + tree-sitter\n\n## MCP Integration\n\nRun pyscn analyses straight from AI coding assistants via the Model Context Protocol (MCP). The bundled `pyscn-mcp` server exposes the same tools used in the CLI to Claude Code, Cursor, ChatGPT, and other MCP clients.\n\n### MCP Use Cases\n\nYou can interact with pyscn with your AI coding tools:\n\n1. \"Analyze the code quality of the app/ directory\"\n\n2. \"Find duplicate code and help me refactor it\"\n\n3. \"Show me complex code and help me simplify it\"\n\n### Claude Code Setup\n\n**Option 1: Install via Plugin Marketplace (Recommended)**\n\n```bash\nclaude plugin marketplace add ludo-technologies/pyscn\nclaude plugin install pyscn-mcp@pyscn-marketplace\n```\n\n**Option 2: Manual MCP Setup**\n\n```bash\nclaude mcp add pyscn-mcp uvx -- pyscn-mcp\n```\n\n### Cursor / Claude Desktop Setup\n\nAdd to your MCP settings (`~/.config/claude-desktop/config.json` or Cursor settings):\n\n```json\n{\n  \"mcpServers\": {\n    \"pyscn-mcp\": {\n      \"command\": \"uvx\",\n      \"args\": [\"pyscn-mcp\"],\n      \"env\": {\n        \"PYSCN_CONFIG\": \"/path/to/.pyscn.toml\"\n      }\n    }\n  }\n}\n```\n\nThe instructions like \"Analyze the code quality\" trigger pyscn via MCP.\n\nDive deeper in `mcp/README.md` for setup walkthroughs and `docs/MCP_INTEGRATION.md` for architecture details.\n\n## Installation\n\n```bash\n# Install with pipx (recommended)\npipx install pyscn\n\n# Or with uv\nuv tool install pyscn\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eAlternative installation methods\u003c/summary\u003e\n\n### Build from source\n```bash\ngit clone https://github.com/ludo-technologies/pyscn.git\ncd pyscn\nmake build\n```\n\n### Go install\n```bash\ngo install github.com/ludo-technologies/pyscn/cmd/pyscn@latest\n```\n\n\u003c/details\u003e\n\n## Common Commands\n\n### `pyscn analyze`\nRun comprehensive analysis with HTML report\n```bash\npyscn analyze .                              # All analyses with HTML report\npyscn analyze --json .                       # Generate JSON report\npyscn analyze --select complexity .          # Only complexity analysis\npyscn analyze --select deps .                # Only dependency analysis\npyscn analyze --select complexity,deps,deadcode . # Multiple analyses\n```\n\n### `pyscn check`\nFast CI-friendly quality gate\n```bash\npyscn check .                         # Quick pass/fail check\npyscn check --max-complexity 15 .     # Custom thresholds\npyscn check --max-cycles 0 .          # Only allow 0 cycle dependency\npyscn check --select deps .           # Check only for circular dependencies\npyscn check --allow-circular-deps .   # Allow circular dependencies (warning only)\n```\n\n### `pyscn init`\nCreate configuration file\n```bash\npyscn init                         # Generate .pyscn.toml\n```\n\n\u003e 💡 Run `pyscn --help` or `pyscn \u003ccommand\u003e --help` for complete options\n\n## Configuration\n\nCreate a `.pyscn.toml` file or add `[tool.pyscn]` to your `pyproject.toml`:\n\n```toml\n# .pyscn.toml\n[complexity]\nmax_complexity = 15\n\n[dead_code]\nmin_severity = \"warning\"\n\n[output]\ndirectory = \"reports\"\n```\n\n\u003e ⚙️ Run `pyscn init` to generate a full configuration file with all available options\n\n## Pyscn Bot (GitHub App)\n\n[Pyscn Bot](https://github.com/marketplace/pyscn-bot) monitors your Python code quality automatically.\n\n### Features\n\n- **PR Code Review** - Automatic code review on every pull request\n- **Weekly Code Audit** - Scans your entire repository and creates issues for architectural problems\n\n---\n\n## Documentation\n\n📚 **[Development Guide](docs/DEVELOPMENT.md)** • **[Architecture](docs/ARCHITECTURE.md)** • **[Testing](docs/TESTING.md)**\n\n## Enterprise Support\n\nFor commercial support, custom integrations, or consulting services, contact us at contact@ludo-tech.org\n\n## License\n\nMIT License — see [LICENSE](LICENSE)\n\n---\n\n*Built with ❤️ using Go and tree-sitter*\n","funding_links":[],"categories":["命令行工具"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludo-technologies%2Fpyscn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fludo-technologies%2Fpyscn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludo-technologies%2Fpyscn/lists"}