You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- fix(client): append ?clsiserverid=<id> to all build-output URLs so
olcli pdf / olcli output <type> work again. Overleaf's CDN now
requires the hint or returns 404. Closes#22.
- fix(upload): preserve the relative path (figures/fig01.png) instead
of basename-stripping it; lazy-load and cache the folder tree inside
OverleafClient.uploadFile so files land in the correct subfolder.
- fix(sync): subfolder files in the sync upload pass now also land in
the right folder via the same self-healing path in uploadFile.
- feat(cli): global --verbose flag prints every HTTP request, status,
and (on errors) a response-body snippet to stderr. Closes#21.
- docs(README): new Global options section; cross-link from Sync and
Self-hosted Overleaf sections.
- chore: bump to 0.3.1, update CHANGELOG.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,19 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [0.3.1] - 2026-05-18
6
+
7
+
### Fixed
8
+
-**`olcli pdf` / `olcli output <type>` returned `Download failed: 404`** (#22) — Overleaf's CDN now requires `?clsiserverid=<id>` on every build-output download. We were stripping that hint. The compile response's `clsiServerId` field is now appended to all output URLs (`pdf`, `bbl`, `log`, `aux`, …).
9
+
-**`olcli upload figures/fig01.png` placed the file in project root** instead of inside `figures/`. The CLI previously called `basename()` on the path and never resolved the folder tree. Now the relative path is preserved and the folder tree is loaded (and cached) on demand. Subfolders are auto-created if missing.
10
+
-**`olcli sync` upload pass** also dropped subfolder information when pushing local-newer files. Same fix as above (`uploadFile` now self-resolves the folder tree when the caller doesn't pass one).
11
+
12
+
### Added
13
+
-**Global `--verbose` flag** (#21) — prints every HTTP request, status, content-type, and (on non-2xx) a 200-char snippet of the response body to stderr. Use as `olcli --verbose pdf` or `olcli pdf --verbose` for troubleshooting failed compiles, uploads, or auth.
14
+
15
+
### Internal
16
+
- New `OverleafClient.getOrLoadFolderTree(projectId)` / `invalidateFolderTree(projectId)` helpers with per-project caching, so callers no longer have to plumb a `folderTree` argument through every code path.
Copy file name to clipboardExpand all lines: README.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,6 +178,25 @@ All commands auto-detect the project when run from a synced directory (contains
178
178
|`olcli config set-cookie-name <name>`| Set the session cookie name |
179
179
|`olcli check`| Show config paths and credential sources |
180
180
181
+
### Global options
182
+
183
+
These flags work with **every** command and may be placed before or after the command name:
184
+
185
+
| Flag | Description |
186
+
|------|-------------|
187
+
|`--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. |
188
+
|`--base-url <url>`| Override the Overleaf instance base URL (also `OVERLEAF_BASE_URL` env var or `olcli config set-url`). |
189
+
|`--cookie-name <name>`| Override the session cookie name (default `overleaf_session2`; older instances use `overleaf.sid`). |
190
+
191
+
Examples:
192
+
193
+
```bash
194
+
olcli --verbose pdf # see every request the compile makes
195
+
olcli pdf --verbose # same thing, flag after command
196
+
olcli --verbose sync # debug a sync that's misbehaving
197
+
olcli --verbose upload figures/a.png # confirm the file is placed in figures/
198
+
```
199
+
181
200
## Use Cases
182
201
183
202
### Local Editing with Overleaf Compilation
@@ -266,7 +285,7 @@ olcli output --list
266
285
- Pushes local changes to remote
267
286
-**Propagates local deletions to the remote** — if you delete a file locally, it's deleted on Overleaf on the next sync. Use `--no-delete` to opt out.
268
287
- Filters out LaTeX build artifacts and OS noise
269
-
- Use `--verbose` to see detailed file operations
288
+
- Use `--verbose` to see detailed file operations (see [Global options](#global-options))
You can point `olcli` at a self-hosted instance and override the session cookie name.
359
+
You can point `olcli` at a self-hosted instance and override the session cookie name. Both flags are documented under [Global options](#global-options) and can be combined with any command.
0 commit comments