Skip to content

Teddy-van-Jerry/LocalLeaf

Repository files navigation

LocalLeaf Logo

LocalLeaf: Local LaTeX Editing yet Synced to Overleaf

VS Code Marketplace Website License

A VS Code extension for a workaround solution to collaborate on LaTeX documents using Overleaf while editing them locally.

Features

  • 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)

Getting Started

  1. Install the extension from the VS Code Marketplace
  2. Run LocalLeaf: Login command and enter your Overleaf cookies (see how to get cookies)
  3. Open a folder and run LocalLeaf: Link Folder to Overleaf Project
  4. 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 as https://www.overleaf.com.attacker.test or 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: Logout if you suspect exposure.

Commands

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

Settings

Setting Default Description
localleaf.defaultServer https://www.overleaf.com Overleaf server URL (for self-hosted instances)
localleaf.autoSync true Automatically sync when files change

Philosophy

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.

Related Projects

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.

Attribution

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.

License

MIT

About

Local LaTeX Editing yet Synced to Overleaf

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •