gitmyhub

writeback

JavaScript ★ 18 updated 12d ago

A tool that lets you scribble questions on a tldraw whiteboard and have Claude Code write the answer back in the right spot on the canvas.

JavaScriptNode.jstldrawClaude Codesetup: moderatecomplexity 3/5

Writeback is a small tool that connects an AI assistant to an infinite whiteboard app called tldraw offline, so you can scribble on a canvas and get an answer drawn back onto it in the right spot. For example, if you draw a right triangle, label two sides with numbers, put a question mark on the third side, and then pause, the correct answer appears right where the question mark was a few seconds later. Nothing you already drew gets moved or erased.

Tldraw offline is a desktop whiteboard app where each drawing is saved as a local file on your computer, with no account needed and no internet required to use it. That app lets a document include a small script that adds interactive behavior, and it always asks your permission before running one. Writeback works by placing its own script inside a tldraw drawing.

To use it, you need the tldraw offline app installed, along with Claude Code already installed and logged in on your computer, since writeback relies on your existing Claude Code login rather than needing a separate API key. You also need Node.js version 18 or newer. Setup involves cloning the project, starting a small local server with a single command, and then pasting the provided script into the drawing's script editor inside tldraw offline.

Once running, the script watches for you to pause writing, takes a screenshot of the canvas along with the position of every shape, and sends that to the local server. The server runs Claude Code in the background, which looks at the screenshot and sends back new shapes with exact positions to draw. The AI model used can be changed by setting an environment variable before starting the server. The project is released under the MIT license.

Where it fits