Skip to content

Releases: aloth/olcli

v0.7.0 — Git Remote Helper

Choose a tag to compare

@aloth aloth released this 02 Jul 15:06

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 push

New

  • git-remote-overleaf (#36) — a git remote helper implementing the import/export protocol. Originally proposed in #15 by @bicheTortue.
    • git clone downloads the full project as a single commit
    • git push uploads only changed/added files and deletes removed ones (incremental via marks)
    • git pull / git fetch detects up-to-date state without redundant downloads
    • Supports custom instances: overleaf::https://my-instance.com/project/<id>
    • Auth via OVERLEAF_SESSION env var or ~/.olauth file
    • 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.md and git remote docs to docs/GIT-REMOTE.md
  • Landing page (docs/index.html) updated with dynamic badges, git remote feature, and MCP section
  • SKILL.md updated 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

Choose a tag to compare

@aloth aloth released this 30 Jun 14:39

New Features

Configurable HTTP timeout (#35, closes #30) — contributed by @rarensu

  • Global --timeout <ms> CLI option
  • OVERLEAF_TIMEOUT environment variable
  • olcli config set-timeout <ms> / olcli config get-timeout to 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_comment MCP tool for AI agents
  • Uses existing postCommentMessage API

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

  • @rarensu (Richard Lawrence) — timeout configuration, comment replies
  • @Li4nx — password login, session persistence

v0.5.0 — Library + MCP Server

Choose a tag to compare

@aloth aloth released this 13 Jun 12:07

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_entities
  • pull_project, push_file, download_file
  • compile, download_pdf, compile_with_outputs
  • list_comments, add_comment, resolve_comment
  • delete_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

Choose a tag to compare

@aloth aloth released this 12 Jun 11:13
45f81e9

Bug Fixes

  • Fix PDF output selection (#26, thanks @drgmr!) — olcli pdf now correctly downloads the main compile output (output.pdf) instead of potentially picking up figure PDFs or *-eps-converted-to.pdf intermediates 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

Choose a tag to compare

@aloth aloth released this 01 Jun 16:14

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 context
  • comments add — attach a comment to selected text or an explicit source range
  • comments 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/olcli

Full Changelog: v0.3.1...v0.4.0

v0.3.1

Choose a tag to compare

@aloth aloth released this 18 May 14:29

Fixes

  • olcli pdf / olcli output <type> returned Download failed: 404 (#22) — Overleaf's CDN now requires ?clsiserverid=<id> on every build-output download. The compile response's clsiServerId is now appended to all output URLs.
  • olcli upload figures/fig01.png placed the file in project root instead of inside figures/. The CLI now preserves the relative path, and OverleafClient.uploadFile lazy-loads + caches the folder tree so files land in the correct subfolder (auto-creating missing folders).
  • olcli sync upload pass had the same subfolder bug — fixed by the same self-healing change.

Added

  • Global --verbose flag (#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 pdf or olcli pdf --verbose.

Internal

  • New OverleafClient.getOrLoadFolderTree(projectId) / invalidateFolderTree(projectId) helpers with per-project caching.

v0.3.0 — Smart ignore: LaTeX build artifacts + .olignore

Choose a tag to compare

@aloth aloth released this 27 Apr 09:23
e0c039d

⚠ 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

  • .olignore file support — gitignore-style syntax for project-level ignore patterns. Negation (!important.aux) supported.
  • .olignore.local file 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 .olignore applies).
  • 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

  • #19sync no longer uploads LaTeX build artifacts that break Overleaf compile.

Internal

  • New module src/ignore.ts with DEFAULT_IGNORE_PATTERNS, loadIgnore(), shouldIgnore(), and buildTexSiblingSet().
  • 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

Choose a tag to compare

@aloth aloth released this 27 Apr 08:22
c59a42b

⚠ 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, sync writes a manifest of remote files to .olcli.json. From then on, any tracked file missing locally is deleted on Overleaf.
  • Use sync --no-delete to opt out per-run, or sync --dry-run --verbose to 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-delete if unsure.

Added

  • delete / rm — delete a file or folder from a project by path
  • rename / mv — rename a file or folder by path
  • sync --no-delete — skip the deletion-propagation phase
  • .olcli.json now stores a manifest field (used for deletion detection)

Fixed

  • #7sync no longer resurrects locally deleted files
  • getProjectInfo() now falls back to the Socket.IO joinProjectResponse when Overleaf no longer ships the project tree in HTML meta tags. This was silently breaking findEntityByPath, deleteByPath, renameByPath.
  • httpRequest() now serializes FormData properly. The 0.1.7 fetch→node-http refactor broke every file upload with The "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

Choose a tag to compare

@aloth aloth released this 17 Apr 17:35

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
  • pdf
  • output log

Tested locally against a live Overleaf project with a Unicode name.

v0.1.7

Choose a tag to compare

@aloth aloth released this 14 Apr 16:23

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-url and --cookie-name
  • olcli config set-url
  • olcli config get-url
  • olcli config set-cookie-name
  • olcli config get-cookie-name

Improved

  • Preserve folder structure when pushing nested files
  • Updated README and command documentation

Fixed

  • Generated output.pdf is no longer pushed back to Overleaf during push / sync
  • Integrated and validated overlapping PR improvements in one tested branch

Validation

  • npm run build passed
  • Full test/e2e.sh passed: 41/41

Community contributions

This release includes work inspired by and integrated from community PRs:

Thank you all for the contributions and ideas that helped shape this release.