Skip to content

Overleaf Sync Now

Stops Claude Code and Codex CLI from silently overwriting your Overleaf web edits with a stale local Dropbox copy. PreToolUse hook + CLI + agent skill.

Install

$git clone https://github.com/hanlulong/overleaf-sync-now

Install command taken from the project's README or registry entry. Always review code before running it.

overleaf-sync-now

Stops Claude Code and Codex CLI from silently overwriting your Overleaf web edits with a stale local Dropbox copy.

The failure mode

You write a paper in Overleaf with Dropbox sync enabled. You edit on overleaf.com from another device, then come back to your laptop and ask Claude Code (or Codex CLI) to keep working on the paper. The AI agent reads the local .tex file — but Overleaf only pushes web edits to Dropbox every 10–20 minutes, so the local copy is stale. The AI proceeds to edit the stale file and saves it back, silently overwriting your fresh web edits. The tool call reports success. Paragraphs you wrote on the web vanish.

overleaf-sync-now is an agent skill (plus a CLI and a Claude Code PreToolUse hook) that closes this gap. Before every AI Read / Edit / Write of a .tex / .bib / .cls / .sty / .bst file under Apps/Overleaf/, it probes Overleaf's version history and pulls down anything new — without changing your existing Dropbox setup, so cross-device sync still works exactly as before.

Is this for you?

  • ✅ You write papers in Overleaf Premium with Dropbox sync enabled (Dropbox/Apps/Overleaf//)
  • ✅ You edit .tex files locally with Claude Code or Codex CLI
  • ✅ You also edit on overleaf.com sometimes — from another device, in a browser, or with collaborators

If you only ever edit locally or only ever edit on the web, your local copy is never stale and you don't need this. Same if you don't use Dropbox or AI agents.


Install

In Claude Code or Codex CLI, paste this prompt:

Install overleaf-sync-now from https://github.com/hanlulong/overleaf-sync-now using uv tool install, then run `overleaf-sync-now install`.

The agent installs everything and runs setup. Restart the agent afterward (/exit then claude in Claude Code; equivalent in Codex).

On Windows with Chrome 130 or later, also run overleaf-sync-now login once — Chrome's new App-Bound Encryption blocks the silent cookie path. Details.

Manual install (no AI agent)

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh && \
  export PATH="$HOME/.local/bin:$PATH" && \
  uv tool install --from git+https://github.com/hanlulong/overleaf-sync-now overleaf-sync-now && \
  overleaf-sync-now install

Windows (PowerShell):

irm https://astral.sh/uv/install.ps1 | iex
$env:PATH = "$env:USERPROFILE\.local\bin;$env:PATH"
uv tool install --from git+https://github.com/hanlulong/overleaf-sync-now overleaf-sync-now
overleaf-sync-now install

Verify

After restart, edit any .tex file under Dropbox/Apps/Overleaf// — the hook fires automatically. Or check manually:

overleaf-sync-now status   # cookie + linked project
overleaf-sync-now sync     # trigger a sync, print latency

Why

You use Dropbox with Overleaf because it gives you free multi-device sync — an edit on your laptop is instantly readable on your desktop, your iPad, and your collaborator's machine. AI agents like Claude Code and Codex CLI plug into that setup naturally: they just read and write the local .tex file like you do.

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

The 1st Collaborative AI Design Agent Workspace. Local-first and open source. Create prototypes, websites, apps, dashboards, presentations, images, and videos with your team…