Releases: aloth/olcli
Release list
v0.7.0 — Git Remote Helper
v0.7.0 — Git Remote Helper
Highlights
Use Overleaf projects as native git remotes. Clone, pull, and push with standard git commands — no wrapper scripts needed.
git clone overleaf::https://www.overleaf.com/project/<id>
cd <project>
# edit files locally...
git add . && git commit -m "update"
git pushNew
git-remote-overleaf(#36) — a git remote helper implementing theimport/exportprotocol. Originally proposed in #15 by @bicheTortue.git clonedownloads the full project as a single commitgit pushuploads only changed/added files and deletes removed ones (incremental via marks)git pull/git fetchdetects up-to-date state without redundant downloads- Supports custom instances:
overleaf::https://my-instance.com/project/<id> - Auth via
OVERLEAF_SESSIONenv var or~/.olauthfile - Debug mode via
GIT_REMOTE_OVERLEAF_DEBUG=1 - State stored in
.git/overleaf/(marks + manifest)
How It Works
The helper speaks git's fast-import/fast-export protocol with mark-based tracking. On clone/fetch it downloads a project zip and emits a fast-import stream. On push it parses the fast-export stream to determine file modifications and deletions, then calls the Overleaf API to apply them.
Improved
- README restructured — extracted MCP docs to
docs/MCP.mdand git remote docs todocs/GIT-REMOTE.md - Landing page (
docs/index.html) updated with dynamic badges, git remote feature, and MCP section SKILL.mdupdated with git remote, MCP, comments, and "when to use which mode" decision table
Install
After npm i -g @aloth/olcli, the binary git-remote-overleaf is on PATH. Any overleaf:: URL is automatically handled.
v0.6.0
New Features
Configurable HTTP timeout (#35, closes #30) — contributed by @rarensu
- Global
--timeout <ms>CLI option OVERLEAF_TIMEOUTenvironment variableolcli config set-timeout <ms>/olcli config get-timeoutto persist- Precedence: flag > env > config > default (10000ms)
- Fixes network timeouts for users behind proxies or with slow connections (#29)
Reply to comment threads (#34, closes #33) — contributed by @rarensu
olcli comments reply <threadId> <body> [project]- New
reply_to_commentMCP tool for AI agents - Uses existing
postCommentMessageAPI
Password login for self-hosted instances (#32) — contributed by @Li4nx
olcli auth --email <email> --password ***- Auto-refreshes expired sessions using stored credentials
OverleafClient.fromPasswordLogin()static factory method- MCP server automatically falls back to password login when cookie expires
- Ideal for self-hosted Overleaf/ShareLaTeX without reCAPTCHA
Session cookie persistence improvements (#31) — contributed by @Li4nx
getSessionCookiePair()for robust cookie name detection- Credential persistence helpers exported via library API
- Supports varied cookie names across Overleaf versions (
overleaf_session2,overleaf.sid,sharelatex.sid)
Full Changelog
- feat: configurable timeout, comment replies, and password login
- chore: bump version to 0.6.0, update README
Contributors
v0.5.0 — Library + MCP Server
What's New
📦 Library Export
olcli is now dual-use — CLI and importable library:
import { OverleafClient } from '@aloth/olcli';
const client = await OverleafClient.fromSessionCookie(cookie);
const projects = await client.listProjects();All types and interfaces are exported with full TypeScript declarations.
🤖 MCP Server (Model Context Protocol)
New olcli-mcp binary — 14 tools for AI agents (Claude Desktop, Cursor, Windsurf, etc.):
list_projects,get_project_info,get_entitiespull_project,push_file,download_filecompile,download_pdf,compile_with_outputslist_comments,add_comment,resolve_commentdelete_entity,rename_entity
Configure in Claude Desktop:
{
"mcpServers": {
"overleaf": {
"command": "npx",
"args": ["-y", "@aloth/olcli", "--mcp"],
"env": { "OVERLEAF_SESSION": "your-session-cookie" }
}
}
}No Breaking Changes
- CLI works identically to v0.4.1
- All existing scripts and workflows continue as-is
v0.4.1
Bug Fixes
- Fix PDF output selection (#26, thanks @drgmr!) —
olcli pdfnow correctly downloads the main compile output (output.pdf) instead of potentially picking up figure PDFs or*-eps-converted-to.pdfintermediates that appear earlier in the output file list.
Details
Overleaf's CLSI always names the main compile output output.pdf. The previous find(f => f.type === 'pdf') could match the wrong file in projects with included PDF figures. Now matches by path first, with a type-based fallback for compatibility.
v0.4.0
What's New
Review Comment Management (#25) — thanks @shiquda! 🎉
New olcli comments subcommands:
comments list— view comments with source file, line/column, selected text, messages, and optional contextcomments add— attach a comment to selected text or an explicit source rangecomments resolve/reopen/delete— manage comment threads
Supports --status open|resolved|all, --context N, and --json output.
Nix Flake (#24)
Install directly via Nix:
nix profile install github:aloth/olcliFull Changelog: v0.3.1...v0.4.0
v0.3.1
Fixes
olcli pdf/olcli output <type>returnedDownload failed: 404(#22) — Overleaf's CDN now requires?clsiserverid=<id>on every build-output download. The compile response'sclsiServerIdis now appended to all output URLs.olcli upload figures/fig01.pngplaced the file in project root instead of insidefigures/. The CLI now preserves the relative path, andOverleafClient.uploadFilelazy-loads + caches the folder tree so files land in the correct subfolder (auto-creating missing folders).olcli syncupload pass had the same subfolder bug — fixed by the same self-healing change.
Added
- Global
--verboseflag (#21) — prints every HTTP request, status, content-type, and (on non-2xx) a snippet of the response body to stderr. Works before or after the command name:olcli --verbose pdforolcli pdf --verbose.
Internal
- New
OverleafClient.getOrLoadFolderTree(projectId)/invalidateFolderTree(projectId)helpers with per-project caching.
v0.3.0 — Smart ignore: LaTeX build artifacts + .olignore
⚠ Behavior change
push and sync now filter local files through a built-in ignore list before uploading to Overleaf. LaTeX build artifacts (.aux, .bbl, .log, .out, .fls, .fdb_latexmk, .synctex.gz, beamer/biber/glossaries/minted intermediates, etc.) and OS noise (.DS_Store, Thumbs.db, *.swp) are no longer uploaded.
Previously, locally compiling a project (e.g. with pdflatex or latexmk) would upload dozens of build artifacts to Overleaf, which could break Overleaf's own compile (stale .aux / .bbl) or pollute the remote project.
PDF special rule: X.pdf is ignored only if a same-named X.tex (or .ltx) exists in the same folder. Hand-uploaded figures/diagram.pdf is still synced.
To restore the old behavior on a per-run basis: --no-default-ignore (only .olignore applies) or --no-ignore (uploads everything).
Added
.olignorefile support — gitignore-style syntax for project-level ignore patterns. Negation (!important.aux) supported..olignore.localfile support — machine-specific patterns that should not be committed to version control.olcli ignored [dir]command — lists all ignore patterns currently in effect, grouped by source.push --no-default-ignore/sync --no-default-ignore— disable built-in defaults (only.olignoreapplies).push --no-ignore/sync --no-ignore— disable all ignore filtering (escape hatch).push --show-ignored/sync --show-ignored— print files skipped by ignore rules.- New dependency:
ignore(~30KB, zero deps, gitignore-compatible matcher used by ESLint/Prettier).
Fixed
- #19 —
syncno longer uploads LaTeX build artifacts that break Overleaf compile.
Internal
- New module
src/ignore.tswithDEFAULT_IGNORE_PATTERNS,loadIgnore(),shouldIgnore(), andbuildTexSiblingSet(). - New e2e test
test/e2e-ignore.sh(31 assertions) covering defaults,.olignore,.olignore.local, negation, the PDF sibling rule, the--no-*escape hatches, and a real round-trip upload smoke test. - README, SKILL.md, and docs/index.html updated to document both v0.2.0 deletion propagation and v0.3.0 ignore subsystem.
Full Changelog: v0.2.0...v0.3.0
v0.2.0 — Sync deletions + delete/rename commands + FormData upload fix
⚠ Behavior change
sync is now destructive in both directions. Files deleted locally are propagated to Overleaf on the next sync, just like remote deletions are propagated locally.
- On first run after upgrade,
syncwrites a manifest of remote files to.olcli.json. From then on, any tracked file missing locally is deleted on Overleaf. - Use
sync --no-deleteto opt out per-run, orsync --dry-run --verboseto preview. - If you have stale local checkouts where you intentionally removed files, those files will be deleted from Overleaf on the next sync. Pull a fresh copy or use
--no-deleteif unsure.
Added
delete/rm— delete a file or folder from a project by pathrename/mv— rename a file or folder by pathsync --no-delete— skip the deletion-propagation phase.olcli.jsonnow stores amanifestfield (used for deletion detection)
Fixed
- #7 —
syncno longer resurrects locally deleted files getProjectInfo()now falls back to the Socket.IOjoinProjectResponsewhen Overleaf no longer ships the project tree in HTML meta tags. This was silently breakingfindEntityByPath,deleteByPath,renameByPath.httpRequest()now serializesFormDataproperly. The 0.1.7 fetch→node-http refactor broke every file upload withThe "chunk" argument must be of type string or an instance of Buffer.
Tests
New test/e2e-issue7.sh focused suite (22 assertions, all passing) covers delete CLI, rename CLI, sync-after-deletion, and --no-delete.
v0.1.8
What's changed
- Replace fetch with a shared Node http/https client for Overleaf requests
- Fix ByteString/header failures caused by non-Latin1 response headers on additional request paths
- Bump package version to 0.1.8
Verified
- list
- info
- pull
- output log
Tested locally against a live Overleaf project with a Unicode name.
v0.1.7
v0.1.7
This release integrates several tested improvements into olcli, including safer sync behavior and support for self-hosted Overleaf / ShareLaTeX instances.
Added
- Support for self-hosted Overleaf / ShareLaTeX instances
- Configurable
--base-urland--cookie-name olcli config set-urlolcli config get-urlolcli config set-cookie-nameolcli config get-cookie-name
Improved
- Preserve folder structure when pushing nested files
- Updated README and command documentation
Fixed
- Generated
output.pdfis no longer pushed back to Overleaf duringpush/sync - Integrated and validated overlapping PR improvements in one tested branch
Validation
npm run buildpassed- Full
test/e2e.shpassed: 41/41
Community contributions
This release includes work inspired by and integrated from community PRs:
- @admirkadriu — preserve folder structure when pushing files (#3)
- @bicheTortue — README improvements (#9)
- @bicheTortue — avoid re-uploading generated PDF output (#10)
- @Alice-space — self-hosted Overleaf support, configurable base URL / cookie name (#11)
Thank you all for the contributions and ideas that helped shape this release.