BlattBot

An agentic LaTeX editor that syncs with any Overleaf.

Runs on your machine with Codex, Claude Code, or your own model endpoint.

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 — as a text diff or as a rendered PDF diff that highlights the pages that visually changed. On a connected project, approved changes are pushed to Overleaf with a normal history entry; if Overleaf changed in the meantime, a conflicting push is blocked until you resolve it.

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. New entries are deduped and normalized on the way in, and a citation audit checks each one against Crossref and OpenAlex, badging it verified, unresolved, or mismatched. 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 — even without a git bridge, through your existing browser session. Pushes update documents in place, so comments, tracked changes, and history survive, and a Verify button runs Overleaf's own compiler on the pushed state. 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. Every turn shows what it cost, and a disclosure generator writes an AI-use statement from your actual usage logs. Source-available under PolyForm Noncommercial.

Figure 6: the agent settings, system prompt included.

\begin{enumerate}

How it works

Overleaf (optional) ⇄ local project ⇄ Codex 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.

  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 Codex CLI (logged in). Claude Code and custom endpoints are also supported. A TeX engine is auto-installable.