Codebase Explorer

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

  1. 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?
  2. 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.
  3. 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.
  4. 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.
  5. Open one module. Each unit has its signature, a short explanation written for people, and a link to the exact source lines.
  6. 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.
  7. 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.

中文文字稿

  1. 这是 Flask:24 个源文件,约 7.5 万 token。第一次打开这样一个仓库,从哪儿读起?
  2. Codebase Explorer 先把每个文件按函数、类、方法切开,这里一共 447 个;再找出它们之间的调用关系。这一步是普通程序,不调用模型。
  3. 接着由语言模型写出每一个是做什么的,相关的小符号合在一起讲,得到 293 个单元。然后程序把互相调用、位置相近、讲解用词相近的单元归到一组。
  4. 同样的讲解和调用,总是得到同一棵树。模型只给模块起名,不能挪动任何东西。结果是一张系统地图。Flask 的这张图有八个部分。
  5. 打开一个模块。每个单元都有签名、一段写给人看的简短讲解,以及指向确切源码行的链接。
  6. 讲解是概括,确切的事实仍在代码里。所以你或你的编码 agent 可以直接问:cbe find 找到一个符号;cbe source 先核对文件的哈希,再从冻结的快照里把它打印出来。
  7. 要给自己的仓库画这张图:一条命令安装,然后在 Claude Code 里生成,或用任何兼容 OpenAI 接口的端点生成。步骤在 README 里。