What Codebase Explorer makes, in two minutes
The Flask repository, module by module: how the code becomes a map, what each part of the map says, and how to ask for exact facts.
English narration with captions. The voice is synthetic (Kokoro-82M, Apache-2.0). Every number, module name and command output on screen comes from the catalog that cbe generated for Flask; nothing is typed in by hand. Download the video.
Transcript
- This is Flask. Twenty-four source files, about seventy-five thousand tokens. Opening a repository like this for the first time, where do you start reading?
- Codebase Explorer cuts every file at its functions, classes and methods: four hundred and forty-seven of them here. Then it traces the calls between them. This step is ordinary code. No model is involved.
- A language model writes what each one does, explaining small related ones together. That gives two hundred and ninety-three units. A program then groups units that call each other, sit close together and are described in similar words.
- The same explanations and calls always give the same tree. The model only names the modules. It cannot move anything. The result is a map of the system. For Flask, it has eight parts.
- The foundations: the scaffold and blueprint base that the app and blueprints build on.
- The running app: the request lifecycle, the contexts that hold per-request state, and the testing tools.
- Templates, views and wrappers: the view layer.
- Sessions, kept in signed cookies.
- Configuration, loaded from files, objects and environment variables.
- JSON providers, and a tagged serializer for types JSON does not have.
- And the command line, with the public helper functions.
- Open one module. Each unit has its signature, a short explanation written for people, and a link to the exact source lines.
- Explanations are summaries. Exact facts stay in the code. So you, or your coding agent, can ask.
cbe find locates a symbol. cbe source prints it from the frozen snapshot, after checking the file's hash.
- To map your own repository, install it with one command, then generate inside Claude Code, or with any OpenAI-compatible endpoint. The steps are in the README.
中文文字稿
- 这是 Flask:24 个源文件,约 7.5 万 token。第一次打开这样一个仓库,从哪儿读起?
- Codebase Explorer 先把每个文件按函数、类、方法切开,这里一共 447 个;再找出它们之间的调用关系。这一步是普通程序,不调用模型。
- 接着由语言模型写出每一个是做什么的,相关的小符号合在一起讲,得到 293 个单元。然后程序把互相调用、位置相近、讲解用词相近的单元归到一组。
- 同样的讲解和调用,总是得到同一棵树。模型只给模块起名,不能挪动任何东西。结果是一张系统地图。Flask 的这张图有八个部分。
- 基础层:应用与蓝图共同依赖的脚手架和蓝图基类。
- 运行中的应用:请求的生命周期、保存每次请求状态的上下文,以及测试工具。
- 模板、视图与包装类:视图层。
- 会话,存在签名的 cookie 里。
- 配置,从文件、对象和环境变量加载。
- JSON 提供器,以及给 JSON 没有的类型用的带标签序列化器。
- 还有命令行和公开的辅助函数。
- 打开一个模块。每个单元都有签名、一段写给人看的简短讲解,以及指向确切源码行的链接。
- 讲解是概括,确切的事实仍在代码里。所以你或你的编码 agent 可以直接问:
cbe find 找到一个符号;cbe source 先核对文件的哈希,再从冻结的快照里把它打印出来。
- 要给自己的仓库画这张图:一条命令安装,然后在 Claude Code 里生成,或用任何兼容 OpenAI 接口的端点生成。步骤在 README 里。