{"id":44396032,"url":"https://github.com/aloth/olcli","last_synced_at":"2026-02-19T23:03:23.404Z","repository":{"id":336224158,"uuid":"1147798916","full_name":"aloth/olcli","owner":"aloth","description":"Overleaf CLI — Command-line interface to sync, manage, and compile LaTeX projects from your terminal.","archived":false,"fork":false,"pushed_at":"2026-02-19T20:58:06.000Z","size":353,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T21:51:35.046Z","etag":null,"topics":["academic-writing","automation","cli","command-line","developer-tools","latex","latex-compiler","latex-editor","latex-sync","latex-tools","nodejs","overleaf","overleaf-api","overleaf-cli","overleaf-sync","pdf-download","productivity","research-tools","sync-tool","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aloth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-02T08:11:47.000Z","updated_at":"2026-02-19T20:58:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aloth/olcli","commit_stats":null,"previous_names":["aloth/olcli"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/aloth/olcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloth%2Folcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloth%2Folcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloth%2Folcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloth%2Folcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aloth","download_url":"https://codeload.github.com/aloth/olcli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloth%2Folcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29636040,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"ssl_error","status_checked_at":"2026-02-19T22:32:38.330Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["academic-writing","automation","cli","command-line","developer-tools","latex","latex-compiler","latex-editor","latex-sync","latex-tools","nodejs","overleaf","overleaf-api","overleaf-cli","overleaf-sync","pdf-download","productivity","research-tools","sync-tool","typescript"],"created_at":"2026-02-12T04:00:29.209Z","updated_at":"2026-02-19T23:03:23.399Z","avatar_url":"https://github.com/aloth.png","language":"JavaScript","readme":"# olcli — Overleaf CLI\n\n**Command-line interface for Overleaf** — Sync, manage, and compile LaTeX projects from your terminal.\n\n[![npm version](https://img.shields.io/npm/v/@aloth/olcli.svg)](https://www.npmjs.com/package/@aloth/olcli)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nWork 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.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"screenshots/demo.gif\" alt=\"olcli demo\" width=\"600\"\u003e\n\u003c/p\u003e\n\n## Features\n\n**Full Overleaf command-line access:**\n\n- 📋 **List** all your Overleaf projects\n- ⬇️ **Pull** project files to local directory for offline editing\n- ⬆️ **Push** local changes back to Overleaf\n- 🔄 **Sync** bidirectionally with smart conflict detection\n- 📄 **Compile** PDFs using Overleaf's remote compiler\n- 📦 **Download** individual files or full project archives\n- 📤 **Upload** files to projects\n- 📊 **Output** compile artifacts (`.bbl`, `.log`, `.aux` for arXiv submissions)\n\n**Perfect for:**\n- Editing LaTeX in your preferred text editor (Vim, VS Code, Emacs, etc.)\n- Version control with Git while using Overleaf's compiler\n- Automating workflows and CI/CD pipelines\n- Offline work with periodic sync\n- Collaborative projects where some prefer CLI, others prefer web\n\n## Installation\n\n### Homebrew (macOS/Linux)\n\n```bash\nbrew tap aloth/tap\nbrew install olcli\n```\n\n### npm (all platforms)\n\nInstall globally to use the `olcli` command anywhere:\n\n```bash\nnpm install -g @aloth/olcli\n```\n\nOr use with `npx` without installation:\n\n```bash\nnpx @aloth/olcli list\n```\n\n## Quick Start\n\n### 1. Authenticate with Overleaf\n\nGet your session cookie from Overleaf.com:\n\n1. Log into [overleaf.com](https://www.overleaf.com)\n2. Open Developer Tools (F12 or Cmd+Option+I) → Application/Storage → Cookies\n3. Copy the value of `overleaf_session2`\n\nStore it with olcli:\n\n```bash\nolcli auth --cookie \"your_session_cookie_value\"\n```\n\n**Tip:** The cookie stays valid for weeks. Just refresh it when authentication fails.\n\n### 2. List Your Projects\n\n```bash\nolcli list\n```\n\nSee all your Overleaf projects with IDs and last modified dates.\n\n### 3. Pull a Project Locally\n\nDownload any project to work on it locally:\n\n```bash\nolcli pull \"My Thesis\"\ncd My_Thesis/\n```\n\nNow you can edit `.tex` files with your preferred editor (Vim, VS Code, Emacs, etc.).\n\n### 4. Edit Locally, Sync to Overleaf\n\n```bash\n# Edit files locally with your favorite editor\nvim main.tex\n\n# Push changes back to Overleaf\nolcli push\n\n# Or sync bidirectionally (pull + push in one command)\nolcli sync\n```\n\nYour collaborators can continue using the Overleaf web editor — changes sync seamlessly.\n\n### 5. Compile and Download PDF\n\nUse Overleaf's remote compiler from the command line:\n\n```bash\nolcli pdf\n```\n\nThe compiled PDF downloads automatically to your current directory.\n\n## Commands\n\nAll commands auto-detect the project when run from a synced directory (contains `.olcli.json`).\n\n| Command | Description |\n|---------|-------------|\n| `olcli auth` | Set session cookie |\n| `olcli whoami` | Check authentication status |\n| `olcli logout` | Clear stored credentials |\n| `olcli list` | List all projects |\n| `olcli info [project]` | Show project details and file list |\n| `olcli pull [project] [dir]` | Download project files to local directory |\n| `olcli push [dir]` | Upload local changes to Overleaf |\n| `olcli sync [dir]` | Bidirectional sync (pull + push) |\n| `olcli upload \u003cfile\u003e [project]` | Upload a single file |\n| `olcli download \u003cfile\u003e [project]` | Download a single file |\n| `olcli zip [project]` | Download project as zip archive |\n| `olcli compile [project]` | Trigger PDF compilation |\n| `olcli pdf [project]` | Compile and download PDF |\n| `olcli output [type]` | Download compile output files |\n| `olcli check` | Show config paths and credential sources |\n\n## Use Cases\n\n### Local Editing with Overleaf Compilation\n\nWork offline in your favorite editor, push when ready, compile remotely:\n\n```bash\nolcli pull \"Research Paper\"\ncd Research_Paper\nvim introduction.tex\ngit commit -am \"Update intro\"\nolcli push\nolcli pdf\n```\n\n### Git Version Control + Overleaf\n\nKeep your LaTeX project in Git while using Overleaf's compiler:\n\n```bash\nolcli pull \"My Thesis\" thesis\ncd thesis\ngit init\ngit add .\ngit commit -m \"Initial import from Overleaf\"\n\n# Daily workflow\nvim chapters/methods.tex\ngit commit -am \"Draft methods section\"\nolcli sync  # Sync with Overleaf\nolcli pdf\n```\n\n### Automated Workflows\n\nIntegrate Overleaf compilation into CI/CD:\n\n```bash\n#!/bin/bash\nolcli auth --cookie \"$OVERLEAF_SESSION\"\nolcli pull \"Automated Report\"\n./generate-data.py \u003e tables/results.tex\nolcli push\nolcli pdf -o report-$(date +%Y-%m-%d).pdf\n```\n\n### arXiv Submissions\n\nDownload the `.bbl` file for arXiv submissions:\n\n```bash\nolcli output bbl --project \"My Paper\"\n# Downloads: bbl\n```\n\nList all available compile output files:\n\n```bash\nolcli output --list\n# Available output files:\n#   aux          output.aux\n#   bbl          output.bbl\n#   blg          output.blg\n#   log          output.log\n#   ...\n```\n\n## Sync Behavior\n\n### Pull\n- Downloads all files from Overleaf\n- **Skips** local files modified after last pull (won't overwrite your changes)\n- Use `--force` to overwrite local changes\n\n### Push\n- Uploads files modified after last pull\n- Use `--all` to upload all files\n- Use `--dry-run` to preview changes\n\n### Sync\n- Pulls remote changes\n- Preserves local modifications (local wins if newer)\n- Pushes local changes to remote\n- Use `--verbose` to see detailed file operations\n\n## Configuration\n\nCredentials are stored in (checked in order):\n\n1. `OVERLEAF_SESSION` environment variable\n2. `.olauth` file in current directory\n3. Global config: `~/.config/olcli-nodejs/config.json` (macOS/Linux)\n\n### .olauth File\n\nFor project-specific credentials, create `.olauth` in your project directory:\n\n```\ns%3AyourSessionCookieValue...\n```\n\n## Examples\n\n### Work on a thesis\n\n```bash\n# Initial setup\nolcli pull \"PhD Thesis\" thesis\ncd thesis\n\n# Daily workflow\nvim chapters/introduction.tex\nolcli sync\nolcli pdf -o draft.pdf\n```\n\n### Quick PDF download\n\n```bash\nolcli pdf \"Conference Paper\" -o paper.pdf\n```\n\n### Download a single file\n\n```bash\nolcli download main.tex \"My Project\"\n```\n\n### Upload figures\n\n```bash\ncd my-project\nolcli upload figures/diagram.png\n```\n\n### Backup all projects\n\n```bash\nfor proj in $(olcli list --json | jq -r '.[].name'); do\n  olcli zip \"$proj\" -o \"backups/${proj}.zip\"\ndone\n```\n\n### Prepare for arXiv\n\n```bash\ncd my-paper\nolcli output bbl -o main.bbl\nolcli zip -o arxiv-submission.zip\n```\n\n## Troubleshooting\n\n### Session expired\n\nIf you get authentication errors, your session cookie may have expired. Get a fresh one from the browser and run `olcli auth` again.\n\n### Compilation fails\n\nCheck the Overleaf web editor for detailed error logs. Common issues:\n- Missing packages\n- Syntax errors in `.tex` files\n- Missing bibliography files\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request.\n\n## License\n\nMIT © [Alexander Loth](https://alexloth.com)\n","funding_links":[],"categories":["Editors","Research \u0026 Academic"],"sub_categories":["Online editors"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloth%2Folcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faloth%2Folcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloth%2Folcli/lists"}