Skip to content
Writing
Skill

/olcli

Sync and manage Overleaf LaTeX projects from the command line. Pull projects locally, push changes back, compile PDFs, and download compile outputs like .bbl files for arXiv submissions. Use when working with LaTeX, Overleaf, academic papers, or arXiv.

From plugin
olcli
2691 skill

Claude Code

$ npx -y skills add aloth/olcli --skill olcli --agent claude-code

SKILL.md

olcli.SKILL.md
name: overleaf
description: Sync and manage Overleaf LaTeX projects from the command line. Pull projects locally, push changes back, compile PDFs, and download compile outputs like .bbl files for arXiv submissions. Use when working with LaTeX, Overleaf, academic papers, or arXiv.
license: MIT
metadata:
  author: aloth
  version: "1.3"
  cli: olcli
  install: brew tap aloth/tap && brew install olcli

Overleaf Skill

Manage Overleaf LaTeX projects via the `olcli` CLI, native git remote, or MCP server.

When to Use Which Mode

| Mode | Best for | How | |------|----------|-----| | **CLI** (`olcli`) | Interactive workflows, sync, compile, arXiv prep | `olcli pull/push/sync/pdf` | | **Git remote** | Version control, commits, diffs, CI/CD pipelines | `git clone overleaf::…` then standard git | | **MCP server** | AI agents with MCP support (Claude, Cursor, Windsurf) | Connect via `olcli-mcp` stdio transport |

Use **CLI** when you need bidirectional sync with conflict detection, compilation, or comment management. Use **Git remote** when you want proper git history, branches, and standard `git push/pull`. Use **MCP** when an AI agent has native MCP support and doesn't need to shell out.

Installation

# Homebrew (recommended)
brew tap aloth/tap && brew install olcli

# npm
npm install -g @aloth/olcli

Authentication

Get your session cookie from Overleaf:

1. Log into [overleaf.com](https://www.overleaf.com) 2. Open DevTools (F12) → Application → Cookies 3. Copy the value of `overleaf_session2`

olcli auth --cookie "YOUR_SESSION_COOKIE"

Or sign in through a browser window (SSO, Google, two-factor; olcli keeps only the session cookie):

olcli auth --browser

Verify and debug authentication (instance, account, credential source, masked cookie):

olcli auth status

Clear stored credentials:

olcli logout

Clears the global config and the `.olauth` file in the current directory, and reports each. Environment variables cannot be unset by a child process, so `OVERLEAF_SESSION` and `OVERLEAF_EMAIL`/`OVERLEAF_PASSWORD` are reported rather than silently ignored — they outrank anything on disk.

For unattended use on a self-hosted instance without reCAPTCHA, prefer `OVERLEAF_EMAIL`/`OVERLEAF_PASSWORD` over `olcli auth --password`: every command reads them, and nothing is written to disk or to shell history. overleaf.com requires a captcha for password sign-in, which olcli cannot complete; use `olcli auth --browser` or `OVERLEAF_SESSION` there.

Self-hosted Overleaf

olcli config set-url https://overleaf.yourcompany.com
olcli config set-cookie-name overleaf.sid   # if different from default
olcli auth --cookie "YOUR_COOKIE"

Or pass per-command: `olcli --base-url https://overleaf.yourcompany.com list`

Git Remote Helper

Use Overleaf projects as native git remotes. No wrapper scripts needed.

# Clone
git clone overleaf::https://www.overleaf.com/project/<id>
cd <project>

# Edit, commit, push — standard git workflow
vim main.tex
git add . && git commit -m "update introduction"
git push

# Pull latest from Overleaf (a push is refused while Overleaf has edits you
# have not pulled; git push --force overwrites them on purpose)
git pull

Authentication: reads `OVERLEAF_SESSION` env var, the `.olauth` file in the current directory, or stored config (same as CLI).

For self-hosted instances, just use your instance URL:

git clone overleaf::https://overleaf.yourcompany.com/project/<id>

Debug with: `GIT_REMOTE_OVERLEAF_DEBUG=1 git push`

MCP Server

Built-in Model Context Protocol server for AI assistant integration.

# Run standalone
olcli-mcp

# Or via npx (the server is the olcli-mcp command of the @aloth/olcli package)
npx -y --package @aloth/olcli olcli-mcp

Available MCP tools: `list_projects`, `get_project_info`, `pull_project`, `push_file`, `compile`, `download_pdf`, `list_comments`, `get_entities`, `download_file`, `add_comment`, `reply_to_comment`, `resolve_comment`, `delete_entity`, `rename_entity`, `rename_project`, `plan_project_renames`, `compile_with_outputs`, `diff_project`, `create_project`, `accept_tracked_changes`, `reject_tracked_changes`, `suggest_changes` (experimental).

`compile`, `download_pdf` and `compile_with_outputs` accept an optional `resource_path` to compile a specific root document.

`diff_project` is the MCP counterpart of `olcli diff`: read-only, fetches the remote fresh on every call, and returns one entry per changed file with `path`, `status`, `binary` and a unified `patch`. Pass `name_only` to drop the patch text. `plan_project_renames` previews bulk renames and never applies them.

Auth: set `OVERLEAF_SESSION` env var in MCP config, or use stored credentials from `olcli auth`.

Common Workflows

Pull a project to work locally

olcli pull "My Paper"
cd My_Paper/

Create a project

olcli project create "My Paper"
olcli project create "Example Paper" --template example

Edit and sync changes

# After editing files locally
olcli push              # Upload changes only
olcli sync              # Bidirectional sync (pull + push, propagates local deletions)
olcli sync --no-delete  # Sync without propagating local deletions to remote

Review changes before pushing

olcli diff                 # unified diff of every changed file
olcli diff --name-only     # changed paths only
olcli diff --file main.tex # a single file
olcli diff --exit-code     # CI gate: 0 same, 1 differs, 2 failed

The remote side is fetched fresh each run, so this shows what a subsequent `push` would overwrite — not a comparison against the last `pull`. `a/` is the remote, `b/` is local. Binary files are reported as differing without a patch.

`--exit-code` uses `diff(1)`'s statuses so the command can gate a pipeline: `0` nothing differs, `1` something does, `2` the run itself failed. The last one matters — without i

Read more
Stats
274
Stars
Active
Maintenance
TypeScript
Language
MIT
License
Last commit
Created
Added

Repo: aloth/olcli

@aloth
Ships witholcli

Work on Overleaf projects from your terminal while your coauthors keep using the Overleaf web editor.

Stars on GitHub

Momentum

stars in total
269
Star history of aloth/olcli on GitHub, a chart by star-history.com

More skills from other plugins.

humanizer

humanizer

Rewrite AI-sounding text so it reads like the writer without changing what it says. Use when editing or reviewing prose for AI…

@blader@bladerInstall Skill
no-ai-slop

no-ai-slop

Edit drafts into sharper, more human writing while preserving the writer's personal voice, or detect AI-slop patterns without…

@petergyang@petergyangInstall Skill
browser-cdp

browser-cdp

Use this skill when you need to control a Chrome browser via CDP (Chrome DevTools Protocol) to reuse existing login sessions.…

oh-story11d8.6k
@zenstory-ai@zenstory-aiInstall Skill

Questions about olcli.

Which coding agents can use olcli?
olcli installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.