SuperAPI AI 工具集

indexion-doc

通用与其它

查看项目

更新于 10-16 06:43

技能介绍

用途:indexion-doc 用于从源码分析生成依赖关系图和 README 文档。当用户需要依赖图、想从代码注释生成 README,或想可视化项目结构时可使用。

主要能力:

  1. 依赖图(indexion doc graph):可输出 mermaid(默认)、json、dot、d2、text 格式,支持 --title 自定义标题、--output 指定输出文件、--specs-dir 指定 KGF 规范目录。示例:indexion doc graph <path>;indexion doc graph --format=dot <path>;indexion doc graph --title="My Dependencies" --output=deps.mmd <path>。
  2. README 生成(indexion doc readme):从源码 doc 注释生成 README,支持 --format(markdown 默认、json、raw)、--template 模板文件、--config 指定 doc.json、--per-package 逐包生成(跳过已有 README.md)、--[no-]recursive(默认递归)、--include/--exclude 文件过滤、--specs-dir、-o/--output。示例:indexion doc readme --template=.indexion/state/templates/readme.md <path>;indexion doc readme --per-package <path>;indexion doc readme --include='.mbt' --exclude='_test.mbt' <path>。
  3. 模板初始化(indexion doc init):indexion doc init <path>,--force 可覆盖已有模板。

建议流程:先运行 indexion doc init . 初始化模板,再运行 indexion doc graph . 了解依赖,然后用模板生成或更新 README,最后按包生成:indexion doc readme --per-package src/ cmd/indexion/。图输出可嵌入 README 的 Mermaid 代码块;运行前可用 indexion grep --undocumented src/ 检查仍缺注释的部分。

限制:--per-package 会跳过已有 README,因此手写文档不会被覆盖;其他平台支持、收费等资料暂未提供。