Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RepoPitch · 仓库说明书生成器

RepoPitch —— turn any source tree into a pitch kit: Mermaid architecture graph, README skeleton, and a 12-point star checklist.

RepoPitch —— 把任意源码目录变成「发布物料包」:架构依赖图 + README 骨架 + 12 条上星自查清单。

tests license

它解决什么问题

开源项目"代码写完了但一直没发"的最大原因不是懒,是不知道从哪下手。RepoPitch 扫一遍你的源码目录,30 秒产出三件套:

文件 内容
architecture.mermaid.md 模块依赖图(graph TD),顶层目录自动聚类,外部依赖单独分组——直接贴 GitHub/掘金
README-draft.md 带徽章占位与特性/安装/用法骨架的 README 草稿,项目名描述自动从 package.json/pyproject.toml 提取
star-checklist.md 12 条发布自查清单(动图 demo、双语 README、CI 徽章……全勾完再发布)

快速开始

python -m repopitch path/to/your/project
# → path/to/your/project/docs/pitch/{architecture.mermaid.md, README-draft.md, star-checklist.md}
python -m repopitch . --no-mermaid      # 只要骨架和清单

支持的语言

  • Pythonimport x / from x import y / 相对导入
  • JavaScript:ESM import / 动态 import() / require();scoped 包(@scope/pkg)正确归组

无法解析到项目内的导入自动归入"外部依赖"节点。所有输出顺序确定,可安全 diff。

设计原则

  • 纯标准库,零依赖零网络
  • 不做完整词法分析:正则剥离字符串/注释后匹配导入语句,宁可漏判不误判
  • 友好错误:非源码目录退出码 2 + 中文提示,无堆栈

测试

python -m unittest discover -s tests -q

License

MIT

Install

pip install -e .

Usage

$ python -m repopitch --help
usage: repopitch [-h] [--out-dir OUT_DIR] [--no-mermaid] path
扫描源码目录,生成 Mermaid 架构图、README 骨架与发布自查清单。
positional arguments:
  path               待扫描的源码目录
options:
  -h, --help         show this help message and exit
  --out-dir OUT_DIR  输出目录(默认 docs/pitch)

Contributing

Issues and PRs welcome - run pytest locally before submitting.

About

Turn any source tree into a launch kit: Mermaid architecture graph, README skeleton and a 12-point star checklist.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages