Brian Hung
Projects
git-zero
Browse and chat with a GitHub repo cloned into your browser.
Cloning into the browser
Browser tab
through a CORS proxy
z.query.fsNode
github.com
owner/repo from the URL
git.clone
isomorphic-git, depth 1
createFS(zero, dir)
a Node fs over Zero rows
Zero
fsNode rows, in IndexedDB
File tree
rows to nested folders
CodeMirror
opens a file in a tab
A repo cloned once is read back from the browser, never cloned again.
Asking about the code
messages
tool schemas
tool call
result, next request
useChat
@ai-sdk/react
POST /chat
streamText on a Worker
Gemini 2.0 Flash
@ai-sdk/google
onToolCall
glob, grep, list, read
createFS
the repo, as Zero rows
The server declares the tools; the browser runs them against the repo it holds.