@@ -27,8 +27,10 @@ Work with Overleaf projects directly from your command line. Edit locally with y
2727- 📄 ** Compile** PDFs using Overleaf's remote compiler
2828- 📦 ** Download** individual files or full project archives
2929- 📤 ** Upload** files to projects
30- - 💬 ** Review comments** — list comments with source locations, add, resolve, reopen, and delete threads
30+ - 💬 ** Review comments** — list comments with source locations, add, resolve, reopen, delete threads, and ** reply ** to existing threads
3131- 🗂️ ** Preserve folder structure** when pushing nested files
32+ - ⏱️ ** Configurable timeout** — global ` --timeout <ms> ` flag, ` OVERLEAF_TIMEOUT ` env var, or ` config set-timeout ` for slow connections
33+ - 🔑 ** Password login** — ` olcli auth --email --password ` for self-hosted instances (no browser required)
3234- ⚙️ ** Support self-hosted Overleaf/ShareLaTeX instances** via configurable base URL and session cookie name
3335- 📊 ** Output** compile artifacts (` .bbl ` , ` .log ` , ` .aux ` for arXiv submissions)
3436
@@ -94,18 +96,24 @@ makepkg -si
9496
9597### 1. Authenticate with Overleaf
9698
97- Get your session cookie from Overleaf .com:
99+ ** Option A: Session cookie** (overleaf .com and self-hosted)
98100
991011 . Log into [ overleaf.com] ( https://www.overleaf.com )
1001022 . Open Developer Tools (F12 or Cmd+Option+I) → Application/Storage → Cookies
1011033 . Copy the value of ` overleaf_session2 `
102104
103- Store it with olcli:
104-
105105``` bash
106106olcli auth --cookie " your_session_cookie_value"
107107```
108108
109+ ** Option B: Email/password** (self-hosted instances without reCAPTCHA)
110+
111+ ``` bash
112+ olcli auth --email " you@example.com" --password " your_password"
113+ ```
114+
115+ Credentials are stored securely and the session auto-refreshes on expiry.
116+
109117** Tip:** The cookie stays valid for weeks. Just refresh it when authentication fails.
110118
111119### 2. List Your Projects
@@ -158,7 +166,7 @@ All commands auto-detect the project when run from a synced directory (contains
158166
159167| Command | Description |
160168| ---------| -------------|
161- | ` olcli auth ` | Set session cookie |
169+ | ` olcli auth ` | Set session cookie or login with email/password |
162170| ` olcli whoami ` | Check authentication status |
163171| ` olcli logout ` | Clear stored credentials |
164172| ` olcli list ` | List all projects |
@@ -171,6 +179,7 @@ All commands auto-detect the project when run from a synced directory (contains
171179| ` olcli comments list [project] ` | List comments with source text and file locations (` --status ` , ` --context ` ) |
172180| ` olcli comments add <file> <message> [project] ` | Add a comment to selected text |
173181| ` olcli comments resolve <threadId> [project] ` | Resolve a comment thread |
182+ | ` olcli comments reply <threadId> <body> [project] ` | Reply to a comment thread |
174183| ` olcli comments reopen <threadId> [project] ` | Reopen a resolved comment thread |
175184| ` olcli comments delete <threadId> [project] ` | Permanently delete a comment thread |
176185| ` olcli delete <file> [project] ` | Delete a remote file or folder by path (alias: ` rm ` ) |
@@ -182,6 +191,8 @@ All commands auto-detect the project when run from a synced directory (contains
182191| ` olcli output [type] ` | Download compile output files |
183192| ` olcli config set-url <url> ` | Set a self-hosted Overleaf base URL |
184193| ` olcli config set-cookie-name <name> ` | Set the session cookie name |
194+ | ` olcli config set-timeout <ms> ` | Set default HTTP request timeout |
195+ | ` olcli config get-timeout ` | Show current timeout setting |
185196| ` olcli check ` | Show config paths and credential sources |
186197
187198### Review comments
@@ -191,6 +202,7 @@ olcli comments list "My Paper" --status open --context 2
191202olcli comments list " My Paper" --status resolved --json
192203olcli comments add main.tex " Please clarify this definition" " My Paper" --text " A Skill is"
193204olcli comments add main.tex " Check this sentence" " My Paper" --line 42 --column 1 --length 20 --json
205+ olcli comments reply 6a1a5fedbf90b811e1000001 " Good point, I'll fix this" " My Paper"
194206olcli comments resolve 6a1a5fedbf90b811e1000001 " My Paper" --json
195207olcli comments reopen 6a1a5fedbf90b811e1000001 " My Paper"
196208olcli comments delete 6a1a5fedbf90b811e1000001 " My Paper" --json
@@ -205,6 +217,7 @@ These flags work with **every** command and may be placed before or after the co
205217| ` --verbose ` | Print every HTTP request, status, content-type, and (on errors) a response-body snippet to stderr. Useful for debugging failed compiles, 404s on ` pdf ` /` output ` , auth issues, or unexpected upload behavior. |
206218| ` --base-url <url> ` | Override the Overleaf instance base URL (also ` OVERLEAF_BASE_URL ` env var or ` olcli config set-url ` ). |
207219| ` --cookie-name <name> ` | Override the session cookie name (default ` overleaf_session2 ` ; older instances use ` overleaf.sid ` ). |
220+ | ` --timeout <ms> ` | Override the HTTP request timeout in milliseconds (also ` OVERLEAF_TIMEOUT ` env var or ` olcli config set-timeout ` ). Default: 10000. |
208221
209222Examples:
210223
@@ -388,6 +401,24 @@ olcli config set-url https://latex.example.org
388401olcli config set-cookie-name overleaf.sid
389402```
390403
404+ ### Timeout configuration
405+
406+ For slow connections or large projects, increase the HTTP request timeout:
407+
408+ ``` bash
409+ # One-off: pass as a flag
410+ olcli --timeout 60000 pull " Large Thesis"
411+
412+ # Persist as default
413+ olcli config set-timeout 60000
414+
415+ # Or use environment variable
416+ export OVERLEAF_TIMEOUT=60000
417+ olcli pull " Large Thesis"
418+ ```
419+
420+ Precedence: ` --timeout ` flag > ` OVERLEAF_TIMEOUT ` env > ` config set-timeout ` > default (10000ms).
421+
391422## Examples
392423
393424### Work on a thesis
@@ -487,12 +518,14 @@ import {
487518 // Types / interfaces
488519 Project , ProjectInfo , FolderEntry , DocEntry , FileEntry ,
489520 CommentMessage , ProjectComment , CommentContext , CommentStatus ,
490- ListCommentsOptions , AddCommentOptions , Credentials ,
521+ ListCommentsOptions , AddCommentOptions , Credentials , SessionCookiePair ,
491522
492523 // Configuration utilities
493524 getBaseUrl , setBaseUrl , getSessionCookie , setSessionCookie ,
494525 getSessionCookieName , setSessionCookieName , getCsrf , setCsrf ,
495526 getLastProject , setLastProject , clearConfig , getConfigPath , saveOlAuth ,
527+ getTimeout , setTimeout , getPasswordCredentials , setPasswordCredentials ,
528+ clearPasswordCredentials , type PasswordCredentials ,
496529
497530 // Ignore utilities
498531 DEFAULT_IGNORE_PATTERNS , loadIgnore , shouldIgnore , buildTexSiblingSet ,
@@ -520,18 +553,22 @@ import {
520553| ` get_entities ` | Get a flat list of all files in a project |
521554| ` download_file ` | Download a specific file by its remote path |
522555| ` add_comment ` | Add a review comment to a document |
556+ | ` reply_to_comment ` | Reply to an existing comment thread |
523557| ` resolve_comment ` | Mark a comment thread as resolved |
524558| ` delete_entity ` | Delete a file or document by path |
525559| ` rename_entity ` | Rename a file or document |
526560| ` compile_with_outputs ` | Compile and return all output files (PDF, BBL, logs…) |
527561
528562### Authentication
529563
530- The MCP server reads your session cookie in this order:
564+ The MCP server reads credentials in this order:
531565
5325661 . ** ` OVERLEAF_SESSION ` environment variable** — set in your MCP config (recommended)
533- 2 . ** ` .olauth ` file in cwd** — written by ` olcli auth `
534- 3 . ** Stored config** — written by ` olcli auth `
567+ 2 . ** ` OVERLEAF_EMAIL ` + ` OVERLEAF_PASSWORD ` environment variables** — for password login (self-hosted)
568+ 3 . ** ` .olauth ` file in cwd** — written by ` olcli auth `
569+ 4 . ** Stored config** — written by ` olcli auth ` (including saved password credentials)
570+
571+ When a session cookie expires and password credentials are available, the MCP server automatically re-authenticates.
535572
536573### Claude Desktop
537574
0 commit comments