Pull-only Overleaf project sync using Rookie + PyOverleaf
Project description
Overleaf Pull-Only Sync CLI
Overview
- Pull-only tool that periodically clones/pulls your latest Overleaf projects into a local directory.
- Discovers projects via your browser cookies (Rookie) and lists them via PyOverleaf; syncs using Git.
- Runs in the background as a macOS LaunchAgent or Linux systemd user timer.
Requirements
- macOS or Linux with Git installed.
- Python 3.10+.
- Packages: rookiepy, pyoverleaf (installed via requirements.txt).
- Overleaf Git integration enabled on your account to allow cloning/pulling via git.overleaf.com.
Install
# # Using uv (recommended)
# uv currently not working!
# uv sync
# Or using conda
conda env create -f environment.yml
conda activate overleaf-sync
# Or using pip/venv
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
First Run (setup)
overleaf-pull init --install
# If the console script isn't found, use:
# uv currently not working!
# uv run python -m overleaf_sync.cli init --install
- Prompts for the base directory, interval (1h/12h/24h), count (default 10), browser/profile, and host (default www.overleaf.com).
- Offers a Qt browser login to capture cookies automatically (default Yes if PySide6 is installed). Falls back to optional manual cookie paste.
- Prompts for your Overleaf Git authentication token (required for cloning/pulling and background runs). It will offer to open Overleaf in your browser to fetch it.
- Installs a background job (LaunchAgent on macOS, systemd user timer on Linux).
- Runs a validation sync before installing the scheduler, to confirm access.
Manual Commands
- Run once now:
overleaf-pull run-once
# Or via uv:
uv run python -m overleaf_sync.cli run-once
- Manual sync (with optional overrides):
overleaf-pull sync --count 5 --base-dir ~/Overleaf --browser firefox
# Or via uv:
uv run python -m overleaf_sync.cli sync --count 5 --base-dir ~/Overleaf --browser firefox
- Store or clear cookies in config:
- Folder naming preference:
overleaf-pull set-name-suffix off # Use display name only
overleaf-pull set-name-suffix on # Default: append a short ID to avoid collisions
This affects the local folder names only; project display names on Overleaf remain unchanged.
overleaf-pull set-cookie "name=value; other=value2"
overleaf-pull clear-cookie
- Browser-assisted cookie capture (like olbrowserlogin):
overleaf-pull browser-login
# This opens Overleaf in your browser and guides you to copy document.cookie.
Required cookies
- At minimum:
overleaf_session2andGCLBmust be present in your Cookie header for authenticated requests. - document.cookie cannot see HttpOnly cookies; copy the full Cookie header from the Network tab for a request to your Overleaf host.
Qt browser login (optional)
- Use a built-in Qt browser to log in and auto-capture cookies.
- Conda (recommended on macOS/Linux):
conda activate overleaf-sync
conda install -c conda-forge pyside6
overleaf-pull browser-login-qt
- Pip/venv alternative:
pip install PySide6
python -m overleaf_sync.cli browser-login-qt
During setup, if PySide6 is present, the tool will offer the Qt login flow by default.
Git authentication token
- Overleaf requires a Git auth token for
git clone/git pull. - Generate a token in your Overleaf account (see the Git integration/authentication tokens page or the Git instructions shown in your project UI), then set it:
overleaf-pull set-git-token
# Paste your token when prompted
# Clear it if needed
overleaf-pull clear-git-token
- With a token set, the tool will use URLs like
https://git:<TOKEN>@git.overleaf.com/<PROJECT_ID>automatically. - Status from logs:
overleaf-pull status
- Install or remove background job:
overleaf-pull install-scheduler
overleaf-pull uninstall-scheduler
# Or via uv:
uv run python -m overleaf_sync.cli install-scheduler
uv run python -m overleaf_sync.cli uninstall-scheduler
Installing the scheduler is idempotent: it uninstalls any existing instance first, then reinstalls to ensure only one scheduler is active. Publish to PyPI (CI)
- This repo includes a GitHub Actions workflow that publishes on tags
v*using PyPI Trusted Publishers (OIDC). - Trigger a release:
git tag v0.1.0
git push origin v0.1.0
- The workflow builds sdist/wheel and publishes without storing secrets.
- Adjust interval or latest count:
overleaf-pull set-interval 12h
overleaf-pull set-count 20
- Change base directory:
overleaf-pull set-base-dir /path/to/Overleaf
macOS Logs
- Logs: ~/Library/Logs/overleaf_sync/runner.log
Linux Logs
journalctl --user -u overleaf-sync.timer -u overleaf-sync.service- And ~/.local/state/overleaf_sync/logs/ if configured.
Notes
- This tool is pull-only; it never pushes to Overleaf.
- Safari cookie access may require permissions; Firefox is often more reliable for unattended use.
- If Safari access fails, paste Overleaf cookies once via
set-cookieto avoid elevated access. - Use Git credential helpers for smooth pulls:
git config --global credential.helper osxkeychain # macOS
git config --global credential.helper libsecret # Linux
Background runs
- To avoid interactive Git prompts in schedulers, set an Overleaf Git token once:
overleaf-pull set-git-token
- Without a token, new clones will fail with 403; existing repos may also fail if their remotes lack the token. Prompts are disabled in background.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file overleaf_pull-0.1.0.tar.gz.
File metadata
- Download URL: overleaf_pull-0.1.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cbda6c249addf33344c090b0962d27356c45e630c644d0362c2ec83a86bd58d
|
|
| MD5 |
ee5a1a963b09e9f42f32e68012d0dfe8
|
|
| BLAKE2b-256 |
0a9664c04e5be80fa0d53bc745322bd97ea93489870e0fc8b59992f64ea18eef
|
Provenance
The following attestation bundles were made for overleaf_pull-0.1.0.tar.gz:
Publisher:
publish.yml on LeanderK/overleaf_sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overleaf_pull-0.1.0.tar.gz -
Subject digest:
3cbda6c249addf33344c090b0962d27356c45e630c644d0362c2ec83a86bd58d - Sigstore transparency entry: 904486442
- Sigstore integration time:
-
Permalink:
LeanderK/overleaf_sync@49276432b242d3758200ca1109c10847e9f657ba -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LeanderK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@49276432b242d3758200ca1109c10847e9f657ba -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file overleaf_pull-0.1.0-py3-none-any.whl.
File metadata
- Download URL: overleaf_pull-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c8fdb9919a7bb1340c26af08bceb985fc0223f141ee88427d9df5442cd6d86
|
|
| MD5 |
29fcfc2d6e7a8181b5d2ae667e4b1842
|
|
| BLAKE2b-256 |
b582e6c05e34fe250ae6ba5a092cba292a367f955e10925a26bb09640d1ea1b9
|
Provenance
The following attestation bundles were made for overleaf_pull-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on LeanderK/overleaf_sync
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overleaf_pull-0.1.0-py3-none-any.whl -
Subject digest:
48c8fdb9919a7bb1340c26af08bceb985fc0223f141ee88427d9df5442cd6d86 - Sigstore transparency entry: 904486617
- Sigstore integration time:
-
Permalink:
LeanderK/overleaf_sync@49276432b242d3758200ca1109c10847e9f657ba -
Branch / Tag:
refs/heads/main - Owner: https://github.com/LeanderK
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@49276432b242d3758200ca1109c10847e9f657ba -
Trigger Event:
workflow_dispatch
-
Statement type: