BlattBot

An agentic LaTeX editor that syncs with any Overleaf.

Runs on your machine with your Claude Code or other LLMs.

Figure 1: a real agent session: literature search, three citations added and cited in the text, approved and pushed.

\section{proof}

Agent edits land as diffs you approve

The agent works in a local git checkout and compiles after editing to check its own work. You can watch the diff grow during the turn. Keep what you want and discard the rest. On a connected project, approved changes are pushed to Overleaf with a normal history entry.

Figure 2: an actual edit. The full turn on the left, the diff it produced on the right, ready to approve and push.

\section{editor}

A full editor on its own

Projects can live entirely on your machine. Saving triggers a compile and the PDF sits next to the source. Double-click a line in the PDF to jump back to the code, or send a sentence from the PDF into the chat.

Figure 3: the source beside the compiled PDF.

\section{citations}

Paper search, built in

Search OpenAlex, Semantic Scholar, DBLP, and Crossref from inside the app. Each paper comes with a one-line summary so you can judge relevance quickly. The References tab shows where every entry is cited and flags the ones that never get used. BibTeX import and export are there too.

Figure 4: the References tab after the turn. Three entries the agent found and added, each already cited.

\section{overleaf}

Syncs with any Overleaf

Overleaf.com works, and so does a self-hosted server. Connect over the git bridge or through your existing browser session. You can keep several accounts side by side. When a local project is ready to share, publish it to Overleaf.

Figure 5: a workspace of several projects, two imported and the rest one click away.

\section{trust}

You can read the whole system prompt

The server listens on loopback only and requires a token on every request. Secrets live in your data dir with 0600 permissions.

Figure 6: the agent settings, system prompt included.

\begin{enumerate}

How it works

Overleaf (optional) ⇄ local project ⇄ Claude agent (edit → compile → verify)
                             ⇩
               you review the diff → approve → push
  1. npx blattbot

    Starts the local server and opens the app.

  2. Create or connect a project

    Start with a blank local project, or paste an Overleaf link. BlattBot imports the session from your browser./p>

  3. Ask, then approve

    Ask for an edit and read the diff. Approve it and it's committed.

\end{enumerate}

Requires Node 20+, git, and Claude Code (logged in). A TeX engine is auto-installable.