Edit Overleaf projects locally in VS Code. Work offline, compile LaTeX, and sync changes back when you're ready.
Features
- Clone any Overleaf project to your machine
- Edit offline — no internet needed for local work
- Compile LaTeX locally with latexmk/pdflatex/xelatex
- Sync — pull & push changes to/from Overleaf with one command
- Status bar shows sync state at a glance
- File watcher detects changes to
.tex,.bib,.cls,.styfiles - Secure — your Overleaf token is stored in VS Code's encrypted secret storage, never in plaintext
Installation
From .vsix file (recommended)
- Download the latest
.vsixfrom Releases - In VS Code:
Ctrl+Shift+P→ "Extensions: Install from VSIX..." → select the file
From source
git clone https://github.com/sermare/overleaf-sync-vscode.git
cd overleaf-sync-vscode
npm install
npm run compile
npm run package
# Then install the generated .vsix file
Setup
- Set your Overleaf token:
Ctrl+Shift+P→ "Overleaf: Set API Token"- Get your token from Overleaf Account Settings → "Personal Access Tokens"
- Clone a project:
Ctrl+Shift+P→ "Overleaf: Clone Project"- Paste your project ID or full Overleaf URL
- Start editing!
Commands
| Command | Shortcut | Description |
|---|---|---|
| Overleaf: Clone Project | — | Clone an Overleaf project locally |
| Overleaf: Pull Changes | — | Pull latest from Overleaf |
| Overleaf: Push Changes | — | Commit & push local changes to Overleaf |
| Overleaf: Sync | Cmd+Shift+O |
Pull & push in one step |
| Overleaf: Compile LaTeX Locally | Cmd+Shift+B |
Compile with latexmk/pdflatex |
| Overleaf: Open Compiled PDF | — | Open the generated PDF |
| Overleaf: Set API Token | — | Store your Overleaf token securely |
| Overleaf: Set Project ID | — | Set/change the project ID |
Settings
| Setting | Default | Description |
|---|---|---|
overleafSync.projectId |
"" |
Overleaf project ID |
overleafSync.autoSyncOnSave |
false |
Auto-commit on save |
overleafSync.compileOnSave |
false |
Auto-compile on save |
overleafSync.mainTexFile |
"main.tex" |
Main .tex file to compile |
overleafSync.compilerPath |
"" |
Path to LaTeX compiler (auto-detected) |
Local Compilation
For local compilation you need a TeX distribution installed:
- macOS:
brew install --cask mactex-no-gui - Ubuntu/Debian:
sudo apt install texlive-full - Windows: Install MiKTeX
How it works
This extension uses Overleaf's Git Bridge. Your project is a regular git repo that syncs with Overleaf's servers. This means:
- Full offline support — it's just files on your disk
- Standard git workflow — commit, pull, push
- No proprietary protocols — just HTTPS git
License
MIT