olcli CLI

An Overleaf CLI that pulls LaTeX projects to a folder, pushes edits, compiles PDFs and exposes them to an agent through MCP

  • 243 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • The Overleaf session cookie opens the whole account: projects, files and comments
  • `olcli sync` and `push --delete` remove files on Overleaf that are missing locally
  • Document text and comments are written by collaborators, and the agent receives them as data that may contain someone else's instructions
All reasons and checks

aloth/olcli

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/olcli

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The Overleaf session cookie opens the whole account: projects, files and comments
  • `olcli sync` and `push --delete` remove files on Overleaf that are missing locally
  • Document text and comments are written by collaborators, and the agent receives them as data that may contain someone else's instructions

This is third-party code. Review the repository files before installing.

What it does

olcli works with Overleaf projects from the terminal. `olcli pull` downloads a project to a local folder, `olcli push` sends changes back, and `olcli sync` merges both sides and carries local deletions over to Overleaf. `olcli pdf` builds a PDF on Overleaf's compiler, so no local TeX Live is needed, and `olcli output` downloads `.bbl`, `.log` and `.aux` for an arXiv submission. There are commands for reviewer comments, tracked changes, uploading and renaming files, and support for self-hosted Overleaf and ShareLaTeX. `olcli diff` compares local files with the live project: the `--latexdiff` flag prepares a version with struck-through and underlined edits, and `--exit-code` turns the check into a CI gate. Overleaf also works as a git remote: `git clone overleaf::https://www.overleaf.com/project/<id>`. For agents there is a skill (`npx skills add aloth/olcli`) and the `olcli-mcp` server with over twenty tools; before writing to a project it asks for confirmation in the client.

Who it is for. LaTeX authors of papers and theses who edit a project in their own editor and keep it in Git but build the PDF on Overleaf.

Good fit when

  • A thesis is easier to edit in Vim or VS Code while the PDF is built on Overleaf with no local TeX Live
  • An advisor asks for a version with marked-up edits, and `olcli diff --latexdiff --pdf` prepares it in one command
  • A nightly CI build should fail when the paper on Overleaf has drifted from the repository
  • An agent in Claude Code or Cursor reads reviewer comments and replies to them inside the project
  • You are preparing a `.bbl` for an arXiv submission and need the compile artifacts

Not a fit when

  • The project lives in an ordinary repository and builds locally: Overleaf is an extra link in the chain
  • The agent only needs to read the project through Git without a session cookie: the catalog has Overleaf MCP Server for that
  • Several people edit one file at once: `sync` resolves conflicts by modification time, and the newer local version wins

Example request

Pull the "My Thesis" project from Overleaf, show the reviewer's open comments and build the PDF

Limitations

Sign-in uses the Overleaf session cookie, which you copy from the browser. Email and password login works only for self-hosted servers without reCAPTCHA. Tracked changes work only in projects whose owner is on a paid Overleaf plan. `diff --latexdiff` needs a local `latexdiff` from TeX Live or MacTeX, and `--pdf` compiles on Overleaf's side, so a `.sty` or `.cls` added locally breaks the build. Node.js 20.18.1 or newer is required.

How to disable. Run `olcli logout`: it clears the global config and the local `.olauth`. Then remove the package with `npm uninstall -g @aloth/olcli` or `brew uninstall olcli`, and delete the `overleaf` block from your MCP configuration.

FAQ

How do I sign in to Overleaf from olcli?

Copy the `overleaf_session2` cookie value from the browser developer tools and run `olcli auth --cookie "value"`. For a self-hosted server set the address with `olcli config set-url`, and set the cookie name with `olcli config set-cookie-name` if it differs.

How do I build a PDF without TeX Live?

`olcli pdf` compiles the project on Overleaf and downloads the result. For multi-document projects add `-r appendix.tex` to build that file as the root.

Will sync delete files on Overleaf?

Yes, a file missing locally but present on Overleaf is deleted on the next `sync`. The `--no-delete` flag turns that off, and `--dry-run` shows the plan without changing anything.

Does the MCP server ask before writing?

Yes, `push_file`, `delete_entity`, `rename_entity` and the other writing tools show a confirmation dialog. If the client does not support dialogs, the server writes nothing and returns an `olcli` command to run by hand. The `OLCLI_MCP_UNCONFIRMED_WRITES=1` variable turns the confirmation off.

Can I work with Overleaf through plain git commands?

Yes: once olcli is installed its remote helper works, and `git clone overleaf::https://www.overleaf.com/project/<id>` creates a working copy. After that you use standard `git commit` and `git push`.

Discussion

No questions or reviews yet.

CLI tools

An MCP server for Overleaf: the agent reads a LaTeX project over Git, finds sections and edits them with a commit

MCP serverBroad access342Repository stars

A skill and CLI olcli that edit Overleaf projects directly: precise replacements, uploads, PDF builds and a live edit session.

SkillExtended access117Repository stars
Official

A CLI and skill for an agent to publish reports and specs as HTML documents that a team comments on, with every version kept

CLIExtended access410Repository stars

A local MCP server for arXiv literature work: section-level paper reads, BibTeX from metadata, topic watches

MCP serverExtended access3.3KRepository stars
Official

Artifact Share CLI: an agent publishes HTML, Markdown and static sites at a stable link and updates it with new versions

CLIExtended access35Repository stars

Docling is a CLI for mixed document archives, bringing PDFs, office files and spreadsheets into a shared format for AI search.

CLIExtended access70.2KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
olcli (this card)no243
Overleaf MCP ServernoAPI key342the agent reads an Overleaf project through Git and edits sections with a commit, while olcli works by session cookie and adds compile, comments and diff
LaTeX Document Skillno821writes a LaTeX document from scratch and builds the PDF locally, while olcli syncs existing Overleaf projects

README in short

The README lists features, install routes via Homebrew, npm and AgentSkills, a quick path of authentication, `pull`, editing, `push` and compile, then a command table and detailed sections on sync, `diff` and deletions. The MCP server and git remote have separate documents in `docs/`.

README badge

Report a problem

Foxx AIolcli
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.