Metadata-Version: 2.5
Name: overlaude
Version: 0.1.0
Summary: Two-way sync between a local folder and an Overleaf project, through Overleaf's live editing channel.
License-Expression: MIT
Keywords: claude,latex,overleaf,sync
Requires-Python: >=3.9
Requires-Dist: diff-match-patch
Requires-Dist: merge3
Requires-Dist: requests
Requires-Dist: websocket-client
Provides-Extra: browser
Requires-Dist: browser-cookie3; extra == 'browser'
Description-Content-Type: text/markdown

# overlaude

Two-way sync between a local folder and an Overleaf project, made for working on papers with Claude Code.

- **Your edits show up as real edits.** Changes go through Overleaf's live editing channel as minimal character edits, the same way typing in the editor does. History shows the words you changed, not "deleted file, uploaded file". Collaborators with the project open see them appear live.
- **Collaborators' edits are merged in.** `ol sync` 3-way merges both sides and prints a diff of what others changed. Edits to different words on the same line merge cleanly. Truly overlapping edits get `<<<<<<< local / >>>>>>> overleaf` markers, and that file is not pushed until the markers are resolved.
- **Works on free accounts.** No git integration or premium plan needed.
- **Claude uses its normal tools.** It's just a folder: Read, Edit, Grep, local scripts for plots. No MCP tool schemas taking up context.

```bash
pip install overlaude            # or: pip install "overlaude[browser]" to grab the cookie from your browser
ol login                         # paste the overleaf_session2 cookie (DevTools > Application > Cookies)
ol projects
ol clone "My Paper"              # -> ./My-Paper/
cd My-Paper
ol sync                          # run before and after editing
ol compile                       # compiles on Overleaf; PDF + log land in .ol/
```

| Situation | What `ol sync` does |
|---|---|
| You edited a doc | pushes the diff as live edits |
| A collaborator edited it | merges into your file, prints the diff |
| Both edited it | merges character-level; overlaps get conflict markers |
| You added a file (figure, .tex, .bib) | uploads it (creates folders as needed) |
| You changed a figure | re-uploads it |
| A collaborator added, changed, or deleted a file | mirrors it locally (unless you changed it) |
| You deleted a file | keeps it on Overleaf unless you pass `--delete` |

Never uploaded: dotfiles, LaTeX build files (`*.aux`, `*.log`, `*.bbl`, ...), `CLAUDE.md`. Add patterns to `.olignore`. Sync state lives in `.ol/`.

Self-hosted Overleaf: `export OVERLEAF_URL=https://overleaf.example.edu`.

## With Claude Code

Copy the skill so Claude knows the workflow:

```bash
mkdir -p ~/.claude/skills/overleaf && cp skill/SKILL.md ~/.claude/skills/overleaf/
```

Then in the project folder: *"sync, then tighten the related-work section and fix the compile errors"*.

## Limits

- Comments and track changes aren't supported yet.
- Renaming a file locally shows up on Overleaf as a new file, plus a deletion if you use `--delete`.
- The cookie expires eventually; `ol login` again.
- This uses Overleaf's private web protocol, which may change without notice.
