Read AI-written code the way it runs.
Unfold shows a code change as the functions it touches, laid out by who calls whom. Review what Claude Code, Cursor or Copilot wrote block by block, not file by file.
$ npx unfold-pr main --open
A diff sorted by file name hides the flow.
Agents write a lot of code fast. The diff hands it back in alphabetical order, so you read helpers before you know who needs them, and the place the change starts is buried halfway down. Where does it begin, what does it call, what does each piece do?
Every changed file, split into its functions and stacked by who calls whom.
Entry points first, then what they call, then helpers and constants. Each block holds the whole function with the changed lines marked. Arrows are real calls, across files too.
Illustration of a map for a small example repo. On a phone, scroll the map sideways.
One command. A map for you, a brief for your agent.
Run it locally against any branch. Unfold writes .unfold/ at the repo root and keeps it out of git for you.
map.htmlThe interactive map, for you.map.mdFor your AI agent: what to check first, calls between files, reading order with file:line ranges.map.jsonThe full data, for tools.Add one step. Every PR gets its map.
With the GitHub Action, each pull request gets one comment: a summary, the review flags and a link to the interactive map.
Built from the real code. Not an AI reviewer.
Unfold parses your code with tree-sitter. Same change in, same map out. It links a call only when the target is unambiguous — a missing arrow is better than a wrong one.
- Guess at a call target it can't resolve.
- Summarise or judge your code with a model.
- Rewrite your code — every block shows it as written.
Free and open source today. Unfold Cloud for private repos, coming soon.
- Local CLI: map.html, map.md and map.json in .unfold/
- GitHub Action with one comment per pull request
- All languages, flags and cross-file arrows
$ npx unfold-pr main --open
- Hosted, private interactive maps stored for every pull request
- Open from the PR, or inside it with a browser extension
- For private repositories, behind GitHub sign-in
Read the code that reads your code.
Unfold is Apache-2.0. The parser, the layout and the Action are all in one repository. Issues and pull requests welcome.