Skill: aloth/overleaf-skill (version 1.1.0)

--- 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.1" cli: olcli install: brew tap aloth/tap && brew install olcli --- # Overleaf Skill Manage Overleaf LaTeX projects via the `olcli` CLI. ## Installation ```bash # 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` ```bash olcli auth --cookie "YOUR_SESSION_COOKIE" ``` Verify with: ```bash olcli whoami ``` Debug authentication issues: ```bash olcli check ``` Clear stored credentials: ```bash olcli logout ``` ## Common Workflows ### Pull a project to work locally ```bash olcli pull "My Paper" cd My_Paper/ ``` ### Edit and sync changes ```bash # After editing files locally olcli push # Upload changes only olcli sync # Bidirectional sync (pull + push) ``` ### Compile and download PDF ```bash olcli pdf # Compile and download olcli pdf -o paper.pdf # Custom output name olcli compile # Just compile (no download) ``` ### Download .bbl for arXiv submission ```bash olcli output bbl # Download compiled .bbl olcli output bbl -o main.bbl # Custom filename olcli output --list # List all available outputs ``` ### Upload figures or assets ```bash olcli upload figure1.png "My Paper" # Upload to project root olcli upload diagram.pdf # Auto-detect project from .olcli.json ``` ### Download specific files ```bash olcli download main.tex "My Paper" # Download single file olcli zip "My Paper" # Download entire project as zip ``` ## arXiv Submission Workflow Complete workflow for preparing an arXiv submission: ```bash # 1. Pull your project olcli pull "Research Paper" cd Research_Paper # 2. Compile to ensure everything builds olcli compile # 3. Download the .bbl file (arXiv requires .bbl, not .bib) olcli output bbl -o main.bbl # 4. Download any other needed outputs olcli output aux -o main.aux # If needed # 5. Package for submission zip arxiv.zip *.tex main.bbl figures/*.pdf # 6. Verify the package compiles locally (optional) # Then upload arxiv.zip to arxiv.org ``` ## Commands Reference | Command | Description | |---------|-------------| | `olcli auth --cookie <value>` | Authenticate with session cookie | | `olcli whoami` | Check authentication status | | `olcli logout` | Clear stored credentials | | `olcli check` | Show config paths and credential sources | | `olcli list` | List all projects | | `olcli info [project]` | Show project details | | `olcli pull [project] [dir]` | Download project files | | `olcli push [dir]` | Upload local changes | | `olcli sync [dir]` | Bidirectional sync | | `olcli upload <file> [project]` | Upload a single file | | `olcli download <file> [project]` | Download a single file | | `olcli zip [project]` | Download as zip archive | | `olcli compile [project]` | Trigger compilation | | `olcli pdf [project]` | Compile and download PDF | | `olcli output [type]` | Download compile outputs | ## Tips - **Auto-detect project**: Run commands from a synced directory (contains `.olcli.json`) to skip the project argument - **Dry run**: Use `olcli push --dry-run` to preview changes before uploading - **Force overwrite**: Use `olcli pull --force` to overwrite local changes - **Project ID**: You can use project ID instead of name (24-char hex from URL) - **Debug auth**: Run `olcli check` to see where credentials are loaded from

path: LICENSE.md
content: MIT License

Copyright (c) 2026 Alexander Loth

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


path: references/API.md
content: # Overleaf API Reference

## Authentication

olcli uses session cookie authentication via `overleaf_session2`.

### Getting the cookie

1. Open browser DevTools (F12)
2. Go to Application → Cookies → www.overleaf.com
3. Copy the value of `overleaf_session2`

The cookie is a URL-encoded signed session, starting with `s%3A`.

### Cookie storage

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

## Project sync metadata

When you `pull` a project, olcli creates `.olcli.json`:

```json
{
  "projectId": "64a1b2c3d4e5f6789abcdef0",
  "projectName": "My Paper",
  "lastPull": 1706868000000
}
```

This enables auto-detection for subsequent commands.

## Compile outputs

The `output` command downloads files from the compile endpoint:

| Type | Description |
|------|-------------|
| `bbl` | Bibliography output (for arXiv) |
| `log` | LaTeX compilation log |
| `aux` | Auxiliary file |
| `blg` | BibTeX log |
| `pdf` | Compiled PDF |
| `out` | Hyperref output |

## Rate limiting

Overleaf has rate limits. olcli spaces requests automatically, but if you hit 429 errors, wait a few seconds.


path: README.md
content: # Overleaf Skill

[![npm version](https://img.shields.io/npm/v/@aloth/olcli.svg)](https://www.npmjs.com/package/@aloth/olcli)
[![Homebrew](https://img.shields.io/badge/homebrew-aloth%2Ftap-orange)](https://github.com/aloth/homebrew-tap)
[![AgentSkills](https://img.shields.io/badge/AgentSkills-compatible-blue)](https://agentskills.io)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

An [Agent Skill](https://agentskills.io) for managing Overleaf LaTeX projects.

<p align="center">
  <img src="https://raw.githubusercontent.com/aloth/olcli/main/screenshots/demo.gif" alt="olcli demo" width="600">
</p>

## What it does

- Pull Overleaf projects to work locally
- Push local changes back to Overleaf
- Compile PDFs and download them
- Download `.bbl` files for arXiv submissions
- Bidirectional sync with conflict detection
- Upload figures and assets to projects

## Installation

### For agents (via skills CLI)

```bash
npx skills add aloth/overleaf-skill
```

### CLI tool only

**Homebrew (macOS/Linux):**
```bash
brew tap aloth/tap && brew install olcli
```

**npm (all platforms):**
```bash
npm install -g @aloth/olcli
```

## Quick start

```bash
olcli auth --cookie "SESSION_COOKIE"  # One-time setup
olcli list                             # See all projects
olcli pull "My Paper"                  # Download project
cd My_Paper && vim main.tex            # Edit locally
olcli sync                             # Push changes
olcli pdf                              # Download PDF
olcli output bbl                       # Get .bbl for arXiv
```

## arXiv Submission Workflow

Complete workflow for submitting to arXiv:

```bash
# 1. Pull and compile your paper
olcli pull "My Paper"
cd My_Paper
olcli pdf

# 2. Download .bbl (required by arXiv instead of .bib)
olcli output bbl -o main.bbl

# 3. Package for arXiv: .tex files + .bbl + figures
zip arxiv-submission.zip *.tex main.bbl figures/*

# 4. Upload to arxiv.org
```

## Links

- [olcli on GitHub](https://github.com/aloth/olcli)
- [olcli on npm](https://www.npmjs.com/package/@aloth/olcli)
- [Homebrew tap](https://github.com/aloth/homebrew-tap)
- [Agent Skills specification](https://agentskills.io/specification)

## License

MIT


path: package.json
content: {
  "name": "@aloth/overleaf-skill",
  "version": "1.1.0",
  "description": "Agent skill for managing Overleaf LaTeX projects via olcli",
  "keywords": [
    "overleaf",
    "latex",
    "cli",
    "arxiv",
    "academic",
    "agent-skill",
    "agentskills",
    "ai-agent",
    "mcp",
    "latex-editor",
    "tex"
  ],
  "homepage": "https://github.com/aloth/overleaf-skill#readme",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/aloth/overleaf-skill.git"
  },
  "bugs": {
    "url": "https://github.com/aloth/overleaf-skill/issues"
  },
  "author": "Alexander Loth <[REDACTED_SECRET]>",
  "license": "MIT"
}


path: scripts/install.sh
content: #!/bin/bash
# Quick setup script for olcli

set -e

# Check if olcli is installed
if command -v olcli &> /dev/null; then
    echo "✓ olcli is already installed ($(olcli --version))"
    exit 0
fi

# Try Homebrew first
if command -v brew &> /dev/null; then
    echo "Installing olcli via Homebrew..."
    brew tap aloth/tap
    brew install olcli
    echo "✓ Installed olcli $(olcli --version)"
    exit 0
fi

# Fall back to npm
if command -v npm &> /dev/null; then
    echo "Installing olcli via npm..."
    npm install -g @aloth/olcli
    echo "✓ Installed olcli $(olcli --version)"
    exit 0
fi

echo "Error: Neither Homebrew nor npm found. Please install one of them first."
exit 1


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)