{"id":51026723,"url":"https://github.com/gitstq/codegraph-insight","last_synced_at":"2026-06-21T20:02:15.650Z","repository":{"id":360917854,"uuid":"1252276403","full_name":"gitstq/codegraph-insight","owner":"gitstq","description":"🔮 智能代码知识图谱分析工具 - 将任何代码库转换为交互式知识图谱","archived":false,"fork":false,"pushed_at":"2026-05-28T11:11:01.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-28T13:10:34.094Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/gitstq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":"2026-05-28T11:08:25.000Z","updated_at":"2026-05-28T11:10:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gitstq/codegraph-insight","commit_stats":null,"previous_names":["gitstq/codegraph-insight"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gitstq/codegraph-insight","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcodegraph-insight","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcodegraph-insight/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcodegraph-insight/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcodegraph-insight/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitstq","download_url":"https://codeload.github.com/gitstq/codegraph-insight/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitstq%2Fcodegraph-insight/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34623906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-21T20:02:14.945Z","updated_at":"2026-06-21T20:02:15.643Z","avatar_url":"https://github.com/gitstq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔍 CodeGraph-Insight\n\n\u003cdiv align=\"center\"\u003e\n\n[![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://python.org)\n[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n[![Version](https://img.shields.io/badge/Version-1.0.0-orange.svg)]()\n\n**Transform your codebase into an interactive knowledge graph**\n\n\u003c/div\u003e\n\n---\n\n## 🌍 Language Selection\n\n- [🇺🇸 English](#english)\n- [🇨🇳 简体中文](#simplified-chinese)\n\n---\n\n\u003ca name=\"english\"\u003e\u003c/a\u003e\n## 🇺🇸 English\n\n### 🎉 Introduction\n\n**CodeGraph-Insight** is a lightweight, powerful code knowledge graph visualization tool that transforms any codebase into an interactive knowledge graph. Unlike complex enterprise solutions, CodeGraph-Insight focuses on simplicity, speed, and ease of use.\n\n**Key Differentiators:**\n- 🚀 **Lightweight**: No heavy dependencies, pure Python implementation\n- 🌐 **Multi-language**: Supports 12+ programming languages\n- 🎯 **Local-first**: All processing happens locally, no code leaves your machine\n- ⚡ **Fast**: Parses large codebases in seconds\n- 🎨 **Beautiful**: Interactive D3.js visualizations\n\n### ✨ Core Features\n\n| Feature | Description | Emoji |\n|---------|-------------|-------|\n| **Multi-Language Parser** | Python, JavaScript, TypeScript, Java, Go, Rust, C/C++, Ruby, PHP, Swift, Kotlin, Scala | 🌐 |\n| **Interactive Visualization** | Force-directed graph with zoom, pan, and search | 🎨 |\n| **Graph Analysis** | NetworkX-powered metrics and centrality analysis | 📊 |\n| **Web Server Mode** | Live exploration with local HTTP server | 🌐 |\n| **Multiple Export Formats** | JSON, D3.js, GraphViz DOT | 📦 |\n| **CLI Interface** | Analyze, visualize, serve, export, search commands | 💻 |\n| **Zero Dependencies** | Core functionality works without external libs | 🎯 |\n\n### 🚀 Quick Start\n\n#### Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/gitstq/codegraph-insight.git\ncd codegraph-insight\n\n# Install dependencies (optional - for enhanced features)\npip install -r requirements.txt\n\n# Or install as package\npip install -e .\n```\n\n#### Basic Usage\n\n```bash\n# Analyze a codebase\npython -m codegraph_insight analyze ./my-project\n\n# Generate interactive visualization\npython -m codegraph_insight visualize ./my-project -o graph.html --open\n\n# Start web server\npython -m codegraph_insight serve ./my-project -p 8080\n\n# Export to JSON\npython -m codegraph_insight export ./my-project -f json -o data.json\n\n# Search for specific entities\npython -m codegraph_insight search ./my-project \"User\" --type class\n```\n\n#### Python API\n\n```python\nfrom codegraph_insight import CodeParser, GraphBuilder, Visualizer\n\n# Parse codebase\nparser = CodeParser(\"./my-project\")\nnodes, edges = parser.parse_project()\n\n# Build graph\nbuilder = GraphBuilder(nodes, edges)\nprint(builder.get_summary())\n\n# Generate visualization\nvisualizer = Visualizer(builder)\nvisualizer.generate_html(\"graph.html\")\n```\n\n### 📖 Detailed Usage Guide\n\n#### Command Reference\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `analyze` | Print code analysis summary | `codegraph-insight analyze ./src` |\n| `visualize` | Generate HTML visualization | `codegraph-insight visualize ./src -o out.html` |\n| `serve` | Start web server | `codegraph-insight serve ./src -p 8080` |\n| `export` | Export graph data | `codegraph-insight export ./src -f json` |\n| `search` | Search code entities | `codegraph-insight search ./src \"auth\"` |\n\n#### Visualization Features\n\nThe generated HTML visualization includes:\n- 🔍 **Search**: Real-time node filtering\n- 🖱️ **Interactive**: Drag nodes, zoom, pan\n- 📊 **Statistics**: Live node/edge counts\n- 🎨 **Color-coded**: Different colors for different node types\n- 💾 **Export**: Download graph data as JSON\n\n### 💡 Design Philosophy\n\nCodeGraph-Insight was designed with these principles:\n\n1. **Simplicity First**: Easy to install, easy to use\n2. **Privacy Focused**: Local processing only\n3. **Language Agnostic**: Support as many languages as possible\n4. **Extensible**: Modular architecture for easy extension\n5. **Beautiful**: Visualizations should be aesthetically pleasing\n\n### 📦 Packaging \u0026 Deployment\n\n#### As Python Package\n\n```bash\n# Build package\npython setup.py sdist bdist_wheel\n\n# Install locally\npip install dist/codegraph_insight-1.0.0-py3-none-any.whl\n```\n\n#### Requirements\n\n- Python 3.8+\n- Optional: NetworkX 3.0+ (for advanced graph analysis)\n- Optional: Modern web browser (for visualization)\n\n### 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'feat: Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n\u003ca name=\"simplified-chinese\"\u003e\u003c/a\u003e\n## 🇨🇳 简体中文\n\n### 🎉 项目介绍\n\n**CodeGraph-Insight** 是一款轻量级、强大的代码知识图谱可视化工具，可以将任何代码库转换为交互式知识图谱。与复杂的企业级解决方案不同，CodeGraph-Insight 专注于简洁、快速和易用性。\n\n**核心差异化优势：**\n- 🚀 **轻量级**：无重量级依赖，纯 Python 实现\n- 🌐 **多语言支持**：支持 12+ 种编程语言\n- 🎯 **本地优先**：所有处理均在本地完成，代码不会离开您的机器\n- ⚡ **极速**：几秒钟内解析大型代码库\n- 🎨 **美观**：交互式 D3.js 可视化\n\n### ✨ 核心特性\n\n| 特性 | 描述 | 图标 |\n|---------|-------------|-------|\n| **多语言解析器** | Python、JavaScript、TypeScript、Java、Go、Rust、C/C++、Ruby、PHP、Swift、Kotlin、Scala | 🌐 |\n| **交互式可视化** | 力导向图，支持缩放、平移和搜索 | 🎨 |\n| **图谱分析** | 基于 NetworkX 的指标和中心性分析 | 📊 |\n| **Web 服务器模式** | 本地 HTTP 服务器实时探索 | 🌐 |\n| **多种导出格式** | JSON、D3.js、GraphViz DOT | 📦 |\n| **CLI 界面** | 分析、可视化、服务、导出、搜索命令 | 💻 |\n| **零依赖** | 核心功能无需外部库 | 🎯 |\n\n### 🚀 快速开始\n\n#### 安装\n\n```bash\n# 克隆仓库\ngit clone https://github.com/gitstq/codegraph-insight.git\ncd codegraph-insight\n\n# 安装依赖（可选 - 用于增强功能）\npip install -r requirements.txt\n\n# 或作为包安装\npip install -e .\n```\n\n#### 基本用法\n\n```bash\n# 分析代码库\npython -m codegraph_insight analyze ./my-project\n\n# 生成交互式可视化\npython -m codegraph_insight visualize ./my-project -o graph.html --open\n\n# 启动 Web 服务器\npython -m codegraph_insight serve ./my-project -p 8080\n\n# 导出为 JSON\npython -m codegraph_insight export ./my-project -f json -o data.json\n\n# 搜索特定实体\npython -m codegraph_insight search ./my-project \"User\" --type class\n```\n\n#### Python API\n\n```python\nfrom codegraph_insight import CodeParser, GraphBuilder, Visualizer\n\n# 解析代码库\nparser = CodeParser(\"./my-project\")\nnodes, edges = parser.parse_project()\n\n# 构建图谱\nbuilder = GraphBuilder(nodes, edges)\nprint(builder.get_summary())\n\n# 生成可视化\nvisualizer = Visualizer(builder)\nvisualizer.generate_html(\"graph.html\")\n```\n\n### 📖 详细使用指南\n\n#### 命令参考\n\n| 命令 | 描述 | 示例 |\n|---------|-------------|---------|\n| `analyze` | 打印代码分析摘要 | `codegraph-insight analyze ./src` |\n| `visualize` | 生成 HTML 可视化 | `codegraph-insight visualize ./src -o out.html` |\n| `serve` | 启动 Web 服务器 | `codegraph-insight serve ./src -p 8080` |\n| `export` | 导出图谱数据 | `codegraph-insight export ./src -f json` |\n| `search` | 搜索代码实体 | `codegraph-insight search ./src \"auth\"` |\n\n#### 可视化功能\n\n生成的 HTML 可视化包含：\n- 🔍 **搜索**：实时节点过滤\n- 🖱️ **交互**：拖拽节点、缩放、平移\n- 📊 **统计**：实时节点/边计数\n- 🎨 **颜色编码**：不同类型节点不同颜色\n- 💾 **导出**：下载图谱数据为 JSON\n\n### 💡 设计理念\n\nCodeGraph-Insight 遵循以下设计原则：\n\n1. **简洁优先**：易于安装，易于使用\n2. **隐私保护**：仅本地处理\n3. **语言无关**：支持尽可能多的语言\n4. **可扩展**：模块化架构，易于扩展\n5. **美观**：可视化效果赏心悦目\n\n### 📦 打包与部署\n\n#### 作为 Python 包\n\n```bash\n# 构建包\npython setup.py sdist bdist_wheel\n\n# 本地安装\npip install dist/codegraph_insight-1.0.0-py3-none-any.whl\n```\n\n#### 环境要求\n\n- Python 3.8+\n- 可选：NetworkX 3.0+（用于高级图谱分析）\n- 可选：现代 Web 浏览器（用于可视化）\n\n### 🤝 贡献指南\n\n我们欢迎贡献！请参阅我们的 [贡献指南](CONTRIBUTING.md) 了解详情。\n\n1. Fork 本仓库\n2. 创建您的功能分支 (`git checkout -b feature/amazing-feature`)\n3. 提交您的更改 (`git commit -m 'feat: 添加惊人的功能'`)\n4. 推送到分支 (`git push origin feature/amazing-feature`)\n5. 打开 Pull Request\n\n### 📄 开源协议\n\n本项目采用 MIT 协议开源 - 详情请参阅 [LICENSE](LICENSE) 文件。\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by the CodeGraph Team**\n\n[⬆ Back to Top](#-codegraph-insight)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fcodegraph-insight","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitstq%2Fcodegraph-insight","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitstq%2Fcodegraph-insight/lists"}