Book a call
Overview

Lampo

A local, real-time LaTeX PDF preview for writing and reviewing technical papers with coding agents. Run one command in a folder, watch changes appear in your browser, and export the finished PDF without uploading your work anywhere.

GoJavaScript
LaTeXPDF.jsCLI
Lampo

I’ve been wanting to write more technical papers about machine learning and LLMs, and I want my agents involved in the whole process: drafting sections, proofreading, reviewing arguments, fixing LaTeX, and going back and forth on the details. The awkward part wasn’t getting an agent to edit a .tex file. It was seeing the paper change while the agent worked.

I tried the existing LaTeX writing tools, but they kept asking me to move the work into their environment. Overleaf is a good collaborative editor, and OpenAI’s Prism is an interesting take on AI-assisted scientific writing. Neither solves my particular problem: the useful context is already in my ChatGPT and Claude Code conversations, and the files are already on my computer. I don’t want another editor, a new agent, or a cloud workspace between them and the document.

So I built Lampo: a tiny CLI that does one thing very well. Run lampo inside a folder of LaTeX files, and a live PDF preview opens in your browser. Save a file, whether it’s you or an agent making the edit, and the preview updates automatically. When the paper is ready, export the PDF from the same page.

The agent edits; I watch the paper

My setup is a browser beside a coding agent. The agent has the repository, the references, and the conversation that led us here. It can rewrite a paragraph or reorganize a whole section using its normal file tools. Lampo doesn’t need to know which model or editor is doing the writing; it just watches the files on disk and shows me the result.

Terminal window
cd my-paper
lampo

There’s no project import, account, editor plugin, or special integration. I can keep the same preview open while moving between agents, or switch between standalone .tex documents from a picker in the browser. Previously compiled documents appear straight from the cache when I switch back. The viewer also keeps text selectable, links clickable, and zoom sharp even when I’m constantly resizing a split-screen window.

The fastest path from save to PDF

The runtime is one Go binary with the browser interface and Mozilla PDF.js bundled inside it. fsnotify watches the project recursively, including the figures, bibliography, and included chapters. After a save, the coordinator briefly coalesces file events, invokes the existing latexmk installation, and pushes status and revision changes to the browser over Server-Sent Events. The browser only fetches a new PDF when there’s a successful build.

The details that matter show up when I’m iterating quickly. Superseded builds get canceled instead of racing to update the page. Each standalone document has its own temporary build directory and cached PDF, so switching documents won’t show the wrong output. If I break the LaTeX, Lampo keeps the last successful PDF visible and exposes the compiler log while I fix it. An error shouldn’t wipe out the page I’m trying to debug.

Local means local

I deliberately kept Lampo separate from AI providers. It doesn’t call a model, manage prompts, or try to replace the tools my agents already know. It binds to localhost by default, runs the LaTeX compiler on my machine, and serves the entire viewer from the binary. With a local TeX installation, it works without an internet connection. My paper never needs to leave the folder or be uploaded to somebody else’s service.

That’s the boundary I wanted: the .tex files stay the source of truth, my agents stay the editors, and Lampo stays the preview. It’s small enough to run wherever I’m writing and fast enough that I stop thinking about the compilation step. There’s a named Export PDF button for when I actually need the finished artifact, and no other workflow to learn.

Use ← and → to navigate