JohnXu22786/codegraph4

dsh-codegraph

将Python代码图谱分析工具桥接为系统工具

AI 分析

适合需要对项目代码进行调用链分析、依赖查询和影响面评估的软件开发任务。

套件
dsh-codegraph
版本
0.1.0
授權
MIT
最近更新
2026年9月12日

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JohnXu22786/codegraph

Configuration

codegraph.json (at the project root, generated by codegraph init; key fields shown below — exclude has 17 defaults, abbreviated here):

{
  "root": ".",
  "include": [],
  "exclude": [".git", "node_modules", "dist", "build", "venv", "target", ".cg"],
  "max_file_kb": 512,
  "incremental": true,
  "engine": "auto",
  "language_map": {}
}
  • include: when non-empty, only matching path prefixes/globs are indexed
  • exclude: directory names or glob patterns pruned during the walk
  • max_file_kb: files larger than this are skipped (usually big/generated files)
  • engine: auto (tree-sitter when grammar packages exist, otherwise regex) / quick / deep
  • language_map: custom extension mapping, e.g. {".md": "markdown"} reserved
  • The database lives at /.cg/cg.sqlite by default (that directory is excluded by default, so the index never includes itself)

Environment variable overrides: CODEGRAPH_ROOT, CODEGRAPH_DB, CODEGRAPH_MAX_FILE_KB, CODEGRAPH_ENGINE.