GitHub

Review what your agents change, flow by flow.

treefy is a PR and codebase toolset for agentic development. Each repo keeps its flows as tree docs, plain-text trees whose nodes point at code, and a review starts from the flow a change touches, not from a wall of diffs.

curl -fsSL https://treefy.ouzx.me/install.sh | sh

Free and open source, under the MIT license. For macOS, Windows and Linux.

Uploadsdocs/upload.md
Upload a batch: back up the new photos
1pick the batchsrc/upload.ts#nextBatch
2send itsrc/upload.ts#send
sentmark it backed up
failedretry ← see Retries
3tell the usersrc/notify.ts#summary
A tree doc as an agent writes it, then as treefy draws it: each level's line, a dot a node, its steps as badges.

Every flow sits beside the code it explains.

A tree doc names the code behind each step: a file, a symbol, a line. Pick a node and its code lights up; pick a line and you see the nodes that explain it.

Uploadsdocs/upload.md
Uploads: back up each new batch of photos
1pick the batchsrc/upload.ts#nextBatch
newest first, 20 at most
2send itsrc/upload.ts#send
failedwait, then try againsrc/retry.ts#retry
3mark them backed upsrc/upload.ts#markDone

Pick a node, or a line of code.

src/upload.ts
1import { retry } from "./retry";
2import type { Photo } from "./photo";
3
4export function nextBatch(queue: Photo[], size = 20) {
5 const newest = queue.toSorted((a, b) => b.takenAt - a.takenAt);
6 return newest.slice(0, size);
7}
8
9export async function send(batch: Photo[]) {
10 return retry(() => upload(batch), { attempts: 5 });
11}
12
13export function markDone(batch: Photo[]) {
14 for (const photo of batch) photo.backedUp = true;
15}
src/retry.ts
1export async function retry(
2 run: () => Promise<boolean>,
3 { attempts = 3 } = {}
4) {
5 for (let attempt = 1; attempt <= attempts; attempt++) {
6 if (await run()) return true;
7 await sleep(1000);
8 }
9 return false;
10}

Review a change one node at a time.

treefy draws the flow a change touches as a diff tree, and puts each code change under the node that explains it. Check a node and its changes fold away. Code no node explains is flagged, so nothing slips through unread.

wt/backoff#41Back off when a send fails1 flow changed3 files+12 −1
Your turn0/3 reviewed
Retriesdocs/retry.md
modified
Retries: a failed send waits, then tries again
1wait a second1
1wait twice as long each time, 30 s at most1
2try again1
offlinewait for the network first1
3give up after five tries
+4−1
→ wait a second→ wait twice as long each time, 30 s at most→ try again
1export const delay = (attempt: number) =>
2 Math.min(30_000, 500 * 2 ** attempt);
3
5 more lines
69 if (await run()) return true;
7 await sleep(1000);
10 await sleep(delay(attempt));
+6−0
→ offline
1export const online = () =>
2 navigator.onLine
3 ? Promise.resolve()
4 : new Promise((ok) =>
5 addEventListener("online", ok, { once: true })
6 );
+2−0
No node explains it→ a debug line for this branch; it goes before the merge.
1export const debug = (...parts: unknown[]) =>
2 import.meta.env.DEV && console.debug("[shoebox]", ...parts);

Every PR and branch on one map.

The PR atlas draws open PRs, drafts, stacks and local branches as lines off the branch they merge into, as a subway map does. A stack reads at a glance, and so does a PR with a conflict or one that needs a restack.

Talk to your agent from the review.

Leave a note on any node, line or PR. Notes gather in a review session in the order you write them; your agent reads them with treefy notes and answers beside each one.

Review sessionwt/backoff · 1 open
  1. Must-fixsrc/retry.ts:2

    Cap the wait at 30 s, or a phone on bad Wi-Fi waits for minutes.

    claudeCapped at 30 s, with a test for it.

  2. QuestionRetries › offline

    Do we wait for the network before the first try too?

Your agent reads it with treefy notes
Your agent~/shoebox · wt/backoff

$ treefy notes

Review session backoff, open in treefy web: 2 open of 2

- n1 (must-fix) on wt/backoff, at src/retry.ts:2

Cap the wait at 30 s, or a phone on bad Wi-Fi waits for minutes.

- n2 (question) on wt/backoff, at docs/retry.md › offline

Do we wait for the network before the first try too?

$ treefy notes --resolve n1 --reply "Capped at 30 s, with a test for it."

This demo runs in your browser: nothing you write here is sent anywhere.

One small core, everywhere you work.

The same TypeScript core reads the trees and reviews the changes in every part: the CLI, the web app, the Claude Code mod and the VS Code extension. The desktop app is next.

treefy: one small core reads trees and reviews changes, wherever you work
CLIyour shell's, and your agent's
treefy reviewthe flows a change touches, and its flags
treefy notesthe notes you left, for your agent to read and answer
treefy checkfails a PR body that leaves a flag unanswered
Web apptreefy web, on your machine
Overviewevery branch, worktree and PR, by whose move it waits on
Reviewa change beside its flows, node by node
PR atlasstacks and branches as lines off their base
Claude Code modtrees in replies, the review in a pane beside the chat
VS Code extensiontrees in the Markdown preview
Desktop appin Rust on GPUI, for any repo by its link; being built now

Try it on a repo, in your browser.

Open a sample repo as treefy shows it: its flows, a review of each PR, the PRs' atlas, its files and its docs. Nothing to install.

Get treefy.

The desktop app to review in, the CLI for your shell and your agents, and the mod for Claude Code. Every build comes from GitHub releases.

Desktop app

treefy's main app, in Rust: any repo by its link, reviewed node by node.

Apple silicon.dmgIntel.dmg

The builds aren't signed yet. If macOS won't open the app, go to System Settings → Privacy & Security and press Open Anyway.

CLI

One binary: the review, notes, tours and the PR body, from your shell or your agent's.

curl -fsSL https://treefy.ouzx.me/install.sh | sh

Or download a binary:

Claude Code

The mod draws trees in replies and opens the review beside the chat; its skill keeps your flows as tree docs. At Claude Code's prompt:

/plugin install treefy --marketplace Ouzx/treefy

Every release on GitHub

Free, and it stays free.

treefy is open source under the MIT license. There's no account, no plan and no price, now or later. It runs on your machine, on your repos.

treefy: free, open source, and staying that way
pricenone, now or later
accountnone: no sign-up, no email
licenseMIT, the source on GitHub
where it runsyour machine, on your repos