olcli

Overleaf CLI - pull, push, sync, compile LaTeX projects from your terminal. Git remote helper, MCP server for AI agents, and TypeScript library.

159
Stars
20
Forks
JavaScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/aloth/olcli

Getting Started

Guides for using skills like olcli.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

olcli — Overleaf CLI

Command-line interface for Overleaf — Sync, manage, and compile LaTeX projects from your terminal.

npm version npm downloads GitHub stars License: MIT AgentSkills

Work with Overleaf projects directly from your command line. Edit locally with your favorite editor, version control with Git, and sync seamlessly with Overleaf's cloud compilation.

olcli demo

Features

  • 📋 List all your Overleaf projects
  • ⬇️ Pull project files to local directory for offline editing
  • ⬆️ Push local changes back to Overleaf
  • 🔄 Sync bidirectionally with smart conflict detection
  • 🔀 Git remote — use Overleaf as a native git remote (docs)
  • ✌️ Two-way deletions — files removed locally are deleted on Overleaf on next sync
  • 🗑️ Delete and ✏️ rename remote files by path
  • 🚫 Smart ignore — LaTeX build artifacts and OS noise filtered automatically; extend with .olignore
  • 📄 Compile PDFs using Overleaf's remote compiler
  • 📦 Download individual files or full project archives
  • 📤 Upload files to projects
  • 💬 Review comments — list, add, resolve, reopen, delete, and reply to threads
  • 🗂️ Preserve folder structure when pushing nested files
  • ⏱️ Configurable timeout for slow connections
  • 🔑 Password login for self-hosted instances (no browser required)
  • ⚙️ Self-hosted Overleaf/ShareLaTeX support
  • 📊 Output compile artifacts (.bbl, .log, .aux for arXiv submissions)
  • 🤖 MCP server for AI assistants (docs)

Perfect for:

  • Editing LaTeX in your preferred text editor (Vim, VS Code, Emacs, etc.)
  • Version control with Git while using Overleaf's compiler
  • Automating workflows and CI/CD pipelines
  • Offline work with periodic sync

Installation

Homebrew (macOS/Linux)

brew tap aloth/tap
brew install olcli

npm (all platforms)

npm install -g @aloth/olcli

Or use with npx without installation:

npx @aloth/olcli list

For AI agents (via AgentSkills)

npx skills add aloth/olcli

Quick Start

1. Authenticate

Session cookie (overleaf.com and self-hosted):

olcli auth --cookie "your_session_cookie_value"

Email/password (self-hosted without reCAPTCHA):

olcli auth --email "you@example.com" --password "your_password"

2. List Projects

olcli list

3. Pull, Edit, Push

olcli pull "My Thesis"
cd My_Thesis/
vim main.tex
olcli push

4. Compile PDF

olcli pdf
# Compile a specific .tex file (for multi-doc projects):
olcli pdf -r appendix.tex

5. Or use native git commands

git clone overleaf::https://www.overleaf.com/project/<id>
cd <project>
# edit, commit, push — standard git workflow
git push

See Git Remote Helper docs for details.

Commands

All commands auto-detect the project when run from a synced directory (contains .olcli.json).

CommandDescription
olcli authSet session cookie or login with email/password
olcli whoamiCheck authentication status
olcli logoutClear stored credentials
olcli listList all projects
olcli info [project]Show project details and file list
olcli pull [project] [dir]Download project files to local directory
olcli push [dir]Upload local changes to Overleaf
olcli sync [dir]Bidirectional sync (pull + push)
olcli upload <file> [project]Upload a single file (--to <path> sets the remote destination)
olcli download <file> [project]Download a single file
olcli delete <file> [project]Delete a remote file or folder (alias: rm)
olcli rename <old> <new> [project]Rename a remote file or folder (alias: mv)
olcli compile [project]Trigger PDF compilation
olcli pdf [project]Compile and download PDF
olcli output [type]Download compile output files
olcli zip [project]Download project as zip archive
olcli comments list [project]List comments (--status, --context)
olcli comments add <file> <msg>Add a comment to selected text
olcli comments reply <id> <body>Reply to a comment thread
olcli comments resolve <id>Resolve a comment thread
olcli comments reopen <id>Reopen a resolved thread
olcli comments delete <id>Delete a comment thread
olcli ignored [dir]List ignore patterns in effect
olcli config set-url <url>Set self-hosted base URL
olcli config set-cookie-name <name>Set session cookie name
olcli config set-timeout <ms>Set default HTTP timeout
olcli checkShow config paths and credential sources

Compile Options

The compile-related commands (compile, pdf, output) accept:

FlagDescription
-r, --resource <path>Compile a specific .tex file as the root document (e.g. appendix.tex, folder/test.tex)

Useful in multi-doc projects: each -r run compiles the file as if it were the main document.

Global Options

FlagDescription
--verbosePrint HTTP requests and responses to stderr
--base-url <url>Override Overleaf instance URL
--cookie-name <name>Override session cookie name
--timeout <ms>Override HTTP timeout (default: 10000)

Sync Behavior

Pull

  • Downloads all files from Overleaf
  • Skips local files modified after last pull (won't overwrite your changes)
  • Use --force to overwrite local changes

Push

  • Uploads files modified after last pull
  • Preserves nested folder structure
  • Filters out LaTeX build artifacts and OS noise
  • Use --all to upload all files, --dry-run to preview

Sync

  • Pulls remote changes, then pushes local changes
  • Local modifications win if newer
  • Propagates local deletions — use --no-delete to opt out
  • Use --dry-run to preview without applying

How deletion propagation works

olcli records a manifest of remote files in .olcli.json. On next sync:

  • File missing locally + still on remote → deleted on Overleaf
  • File new locally → uploaded
  • File modified locally → uploaded (local wins)
  • File only on remote → downloaded

First-time syncs skip the deletion phase (no prior manifest to compare).

Ignoring Files

Three layers

LayerSourcePurpose
1Built-inLaTeX intermediates, OS noise, build dirs. Always on.
2.olignoreProject-level patterns (gitignore syntax).
3.olignore.localMachine-specific patterns.

Later layers override earlier ones. Negation (!important.aux) is supported.

Special PDF rule

X.pdf is ignored only if X.tex (or .ltx) exists in the same folder.

Inspecting and overriding

olcli ignored                  # list patterns in effect
olcli push --show-ignored      # see what was skipped
olcli sync --no-default-ignore # only .olignore applies
olcli sync --no-ignore         # upload everything

Configuration

Credentials are checked in order:

  1. OVERLEAF_SESSION environment variable
  2. .olauth file in current directory
  3. Global config: ~/.config/olcli-nodejs/config.json

Self-hosted Overleaf

olcli config set-url https://latex.example.org
olcli config set-cookie-name overleaf.sid

Or pass per-command: olcli --base-url https://latex.example.org list

Timeout

olcli config set-timeout 60000          # persist
olcli --timeout 60000 pull "Big Thesis" # one-off
export OVERLEAF_TIMEOUT=60000           # env var

Precedence: --timeout > OVERLEAF_TIMEOUT > config > default (10000ms).

Examples

# Daily thesis workflow
olcli pull "PhD Thesis" thesis && cd thesis
vim chapters/methods.tex
olcli sync && olcli pdf -o draft.pdf

# Quick PDF download
olcli pdf "Conference Paper" -o paper.pdf

# Compile a specific root document
olcli pdf "Conference Paper" -r appendix.tex -o appendix.pdf
olcli compile "Conference Paper" -r folder/test.tex

# Upload figures
olcli upload figures/diagram.png          # relative path is preserved
olcli upload /tmp/build/diagram.png       # absolute path lands in the project root
olcli upload /tmp/build/diagram.png --to figures/diagram.png   # explicit destination

# arXiv submission prep
olcli output bbl -o main.bbl
olcli output bbl -r folder/test.tex -o main.bbl  # compile artifacts from a specific root doc
olcli zip -o arxiv-submission.zip

# Backup all projects
for proj in $(olcli list --json | jq -r '.[].name'); do
  olcli zip "$proj" -o "backups/${proj}.zip"
done

Programmatic Usage (Library API)

@aloth/olcli exposes OverleafClient and all public interfaces as a library.

Install

npm install @aloth/olcli

Basic example

import { OverleafClient } from '@aloth/olcli';

const client = await OverleafClient.fromSessionCookie(cookie);

const projects = await client.listProjects();
const info = await client.getProjectInfo(projectId);
const zipBuf = await client.downloadProject(projectId);
const pdfBuf = await client.downloadPdf(projectId);

await client.uploadFile(projectId, null, 'main.tex', readFileSync('main.tex'));

const comments = await client.listComments(projectId, { status: 'open' });

Available exports

import {
  OverleafClient,
  // Types
  Project, ProjectInfo, FolderEntry, DocEntry, FileEntry,
  CommentMessage, ProjectComment, CommentContext, CommentStatus,
  ListCommentsOptions, AddCommentOptions, Credentials, SessionCookiePair,
  // Config utilities
  getBaseUrl, setBaseUrl, getSessionCookie, setSessionCookie,
  getSessionCookieName, setSessionCookieName, getCsrf, setCsrf,
  getLastProject, setLastProject, clearConfig, getConfigPath, saveOlAuth,
  getTimeout, setTimeout, getPasswordCredentials, setPasswordCredentials,
  clearPasswordCredentials, type PasswordCredentials,
  // Ignore utilities
  DEFAULT_IGNORE_PATTERNS, loadIgnore, shouldIgnore, buildTexSiblingSet,
  IgnoreContext, LoadIgnoreOptions,
} from '@aloth/olcli';

Further Documentation

Troubleshooting

Session expired — Get a fresh cookie from the browser and run olcli auth again.

Compilation fails — Check the Overleaf web editor for detailed error logs (missing packages, syntax errors, missing bibliography files).

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT © Alexander Loth

Frequently Asked Questions

What is olcli?

olcli is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by aloth. Overleaf CLI - pull, push, sync, compile LaTeX projects from your terminal. Git remote helper, MCP server for AI agents, and TypeScript library. It has 159 GitHub stars.

Is olcli safe to use?

olcli returned warnings in SkillsLLM's automated security scan. It has no critical vulnerabilities, but review the flagged issues in the Security Report section before adding it to your workflow.

How do I install olcli?

Clone the repository with "git clone https://github.com/aloth/olcli" and add it to your Claude Code skills directory (see the Installation section above). olcli ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is olcli written in?

olcli is primarily written in JavaScript. It is open-source under aloth on GitHub, so you can review or fork the full source.

Are there alternatives to olcli?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh olcli against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details