[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80066":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":15,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},80066,"CodeMap","kirito-chen\u002FCodeMap","kirito-chen","Visualize your Python project",null,"Python",62,48,42,0,1,5.07,"MIT License",false,"main",true,[],"2026-06-12 02:03:57","# CodeMap – Python Code Visualizer\n\nVisualize your Python project from multiple aspects:\n- **Dependency Graph** – which modules import which\n- **Call Tree** – interactive mind‑map of nested function calls\n- **Call Graph** – function call chain starting from an entry point\n- **Heatmap** – complexity hotspots across your codebase\n\n![Recursive call tree](.\u002Fimages\u002Fcalltree.png)\n![dep](.\u002Fimages\u002Fdep.png)\n![heatmap](.\u002Fimages\u002Fheatmap.png)\n\n## Installation\nfrom source:\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fkirito-chen\u002FCodeMap\ncd codemap\nconda create -n codemap_env python=3.9 # (optional)\nconda activate codemap_env # (optional)\npip install -e .\n```\n\n## Usage\n\n### CLI (Command Line)\n```bash\n# 1. Dependency graph (HTML, interactive)\ncodemap deps .\u002Ftest_project --output deps.html\n\n# 2. Interactive call tree (HTML mind‑map, skips built‑ins)\ncodemap tree .\u002Ftest_project\u002Fmain.py --entry start --output call_tree.html\n\n# 3. Call graph (Mermaid format, can be embedded into Markdown)\ncodemap calls .\u002Ftest_project\u002Fmain.py --entry start --format mermaid\n# If you only need plain text, you can add -- format json to view JSON format\ncodemap calls .\u002Ftest_project\u002Fmain.py --entry start --format json\n\n# 4. Heatmap (HTML grid)\ncodemap heatmap .\u002Ftest_project --metric complexity --output heatmap.html\n# or You can also use -- metric lines to count the number of lines of code\ncodemap heatmap .\u002Ftest_project --metric lines --output lines_heat.html\n```\n## Python API\n```python\nfrom codemap import build_dependency_graph, build_call_graph, build_heatmap\n\n# Dependency\ngraph = build_dependency_graph(\".\u002Ftest_project\")\ngraph.render(\"deps.html\")\n\n# Call tree (interactive HTML tree)\ntree_root = build_call_tree(\".\u002Ftest_project\u002Fmain.py\", \"start\")\n\n# Call graph\ncall_data = build_call_graph(\".\u002Ftest_project\u002Fmain.py\", \"run_server\")\nprint(call_data.to_mermaid())\n\n# Heatmap\nheatmap = build_heatmap(\".\u002Ftest_project\", metric=\"complexity\")\nheatmap.save(\"heatmap.html\")\n```\n\n## Features\n- **Zero configuration** – just point to a directory.\n\n- **Interactive HTML** for dependency graph, heatmap, and call tree.\n\n- **Mermaid output** for call graphs (copy into any Markdown file).\n\n- **Extensible** – easy to add support for other languages via tree-sitter.\n\n## Metrics for Heatmap\n- **complexity** – cyclomatic complexity (using radon)\n\n- **lines** – lines of code (excluding blank lines and comments)\n\n- **commits** – not implemented in this version, you can extend\n\n## project structure\n- CodeMap\u002F\n- ├── setup.py                 # set up script\n- ├── README.md                # complete document\n- ├── codemap\u002F\n- │   ├── __init__.py          # Package entrance, exposing high-level APIs\n- │   ├── cli.py               # Command line interface (Click)\n- │   ├── deps.py              # Function 1: Dependency Graph\n- │   ├── tree.py              # Function 2: Recursive call tree (mind‑map)\n- │   ├── calls.py             # Function 3: Function Call Graph\n- │   ├── heatmap.py           # Function 4: Code Heat Map\n- │   ├── utils.py             # Public tools (traversing files, AST assistance)\n- │   └── use_codemap_api.py   # use codemap api test\n- └── test_project\u002F            # Simple project\n","CodeMap 是一个用于可视化 Python 项目的工具。它提供了多种视图来帮助开发者理解代码结构，包括依赖关系图、调用树、调用图和热力图。这些视图能够以交互式 HTML 或 Mermaid 格式输出，方便嵌入到文档中。此外，CodeMap 支持零配置使用，只需指定项目目录即可生成相应的可视化结果。适合于需要对大型 Python 项目进行结构分析、维护或重构的场景，以及希望提高代码可读性和降低复杂度的开发团队。通过 CodeMap，用户可以轻松识别出代码中的复杂热点区域，并追踪函数间的调用关系。",2,"2026-06-11 03:59:06","CREATED_QUERY"]