Skill: aloth/olcli (version 1.0.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.0" 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 ``` ## 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 ``` ## Commands Reference | Command | Description | |---------|-------------| | `olcli auth --cookie <value>` | Authenticate with session cookie | | `olcli whoami` | Check authentication status | | `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>` | Upload a single file | | `olcli download <file>` | 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) ## 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. ## Links - [GitHub](https://github.com/aloth/olcli) - [npm](https://www.npmjs.com/package/@aloth/olcli)

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: 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: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)