A VS Code extension for a workaround solution to collaborate on LaTeX documents using Overleaf while editing them locally.
- Two-way sync with Overleaf projects
- Real-time collaboration - see collaborators' cursors
- Conflict resolution with visual diff view
- Auto-sync on file changes
- Ignore patterns support (like
.gitignore)
- Install the extension from the VS Code Marketplace
- Run
LocalLeaf: Logincommand and enter your Overleaf cookies (see how to get cookies) - Open a folder and run
LocalLeaf: Link Folder to Overleaf Project - Start editing - changes sync automatically!
Warning
- Only paste cookies when the server URL is the real Overleaf host (
https://www.overleaf.com). The extension sends the cookie to whatever URL you enter; avoid lookalike URLs such ashttps://www.overleaf.com.attacker.testor ones that hide another host (e.g.,https://www.overleaf.com@evil.com). - Cookies are stored in VS Code Secret Storage, not in your workspace, but they still grant full account access. Treat them like a password and clear credentials with
LocalLeaf: Logoutif you suspect exposure.
| Command | Description |
|---|---|
LocalLeaf: Login |
Authenticate with Overleaf |
LocalLeaf: Logout |
Clear stored credentials |
LocalLeaf: Link Folder to Overleaf Project |
Connect a local folder to an Overleaf project |
LocalLeaf: Unlink Folder |
Disconnect folder from Overleaf project |
LocalLeaf: Sync Now |
Manually trigger two-way sync |
LocalLeaf: Pull from Overleaf |
Download changes from Overleaf |
LocalLeaf: Push to Overleaf |
Upload local changes to Overleaf |
LocalLeaf: Show Sync Status |
Display sync status and options to resync/reconnect |
LocalLeaf: Edit Ignore Patterns |
Configure files to exclude from sync |
LocalLeaf: Set Main Document |
Set the main .tex file for compilation |
LocalLeaf: Configure Settings |
Open extension settings |
LocalLeaf: Jump to Collaborator |
Navigate to a collaborator's cursor position |
| Setting | Default | Description |
|---|---|---|
localleaf.defaultServer |
https://www.overleaf.com |
Overleaf server URL (for self-hosted instances) |
localleaf.autoSync |
true |
Automatically sync when files change |
LocalLeaf focuses solely on local file synchronization with Overleaf. Unlike browser-based solutions, LocalLeaf:
- Creates a local replica of your Overleaf project that you can edit with any tool
- Does not provide online PDF compilation - use Overleaf's web interface or local tools for that
- Works seamlessly with LaTeX Workshop for local editing, compilation, and preview
This approach gives you the best of both worlds: Overleaf's collaboration features and your preferred local editing environment.
This project was inspired by and references Overleaf-Workshop, which takes a different approach by providing a more integrated Overleaf experience within VS Code, including online PDF preview and compilation. LocalLeaf instead focuses on maintaining a synchronized local copy of your files, leaving PDF compilation to dedicated tools like LaTeX Workshop or Overleaf's web interface.
The LocalLeaf logo is an original Minecraft-style pixelated design depicting a leaf growing from local ground, inspired by the Overleaf logo. LocalLeaf is not affiliated with or endorsed by Overleaf.