@aloth/olcli 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -13
- package/package.json +14 -3
package/README.md
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
|
-
# olcli
|
|
1
|
+
# olcli — Overleaf CLI
|
|
2
2
|
|
|
3
|
-
**Overleaf
|
|
3
|
+
**Command-line interface for Overleaf** — Sync, manage, and compile LaTeX projects from your terminal.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@aloth/olcli)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
Work 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.
|
|
9
|
+
|
|
8
10
|
<p align="center">
|
|
9
11
|
<img src="screenshots/demo.gif" alt="olcli demo" width="600">
|
|
10
12
|
</p>
|
|
11
13
|
|
|
12
14
|
## Features
|
|
13
15
|
|
|
16
|
+
**Full Overleaf command-line access:**
|
|
17
|
+
|
|
14
18
|
- 📋 **List** all your Overleaf projects
|
|
15
|
-
- ⬇️ **Pull** project files to local directory
|
|
19
|
+
- ⬇️ **Pull** project files to local directory for offline editing
|
|
16
20
|
- ⬆️ **Push** local changes back to Overleaf
|
|
17
21
|
- 🔄 **Sync** bidirectionally with smart conflict detection
|
|
18
|
-
- 📄 **Compile**
|
|
22
|
+
- 📄 **Compile** PDFs using Overleaf's remote compiler
|
|
19
23
|
- 📦 **Download** individual files or full project archives
|
|
20
24
|
- 📤 **Upload** files to projects
|
|
21
25
|
- 📊 **Output** compile artifacts (`.bbl`, `.log`, `.aux` for arXiv submissions)
|
|
22
26
|
|
|
27
|
+
**Perfect for:**
|
|
28
|
+
- Editing LaTeX in your preferred text editor (Vim, VS Code, Emacs, etc.)
|
|
29
|
+
- Version control with Git while using Overleaf's compiler
|
|
30
|
+
- Automating workflows and CI/CD pipelines
|
|
31
|
+
- Offline work with periodic sync
|
|
32
|
+
- Collaborative projects where some prefer CLI, others prefer web
|
|
33
|
+
|
|
23
34
|
## Installation
|
|
24
35
|
|
|
25
36
|
### Homebrew (macOS/Linux)
|
|
@@ -29,40 +40,58 @@ brew tap aloth/tap
|
|
|
29
40
|
brew install olcli
|
|
30
41
|
```
|
|
31
42
|
|
|
32
|
-
### npm
|
|
43
|
+
### npm (all platforms)
|
|
44
|
+
|
|
45
|
+
Install globally to use the `olcli` command anywhere:
|
|
33
46
|
|
|
34
47
|
```bash
|
|
35
48
|
npm install -g @aloth/olcli
|
|
36
49
|
```
|
|
37
50
|
|
|
51
|
+
Or use with `npx` without installation:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npx @aloth/olcli list
|
|
55
|
+
```
|
|
56
|
+
|
|
38
57
|
## Quick Start
|
|
39
58
|
|
|
40
|
-
### 1. Authenticate
|
|
59
|
+
### 1. Authenticate with Overleaf
|
|
41
60
|
|
|
42
|
-
Get your session cookie from Overleaf:
|
|
61
|
+
Get your session cookie from Overleaf.com:
|
|
43
62
|
|
|
44
63
|
1. Log into [overleaf.com](https://www.overleaf.com)
|
|
45
|
-
2. Open Developer Tools (F12) → Application → Cookies
|
|
64
|
+
2. Open Developer Tools (F12 or Cmd+Option+I) → Application/Storage → Cookies
|
|
46
65
|
3. Copy the value of `overleaf_session2`
|
|
47
66
|
|
|
67
|
+
Store it with olcli:
|
|
68
|
+
|
|
48
69
|
```bash
|
|
49
70
|
olcli auth --cookie "your_session_cookie_value"
|
|
50
71
|
```
|
|
51
72
|
|
|
52
|
-
|
|
73
|
+
**Tip:** The cookie stays valid for weeks. Just refresh it when authentication fails.
|
|
74
|
+
|
|
75
|
+
### 2. List Your Projects
|
|
53
76
|
|
|
54
77
|
```bash
|
|
55
78
|
olcli list
|
|
56
79
|
```
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
See all your Overleaf projects with IDs and last modified dates.
|
|
82
|
+
|
|
83
|
+
### 3. Pull a Project Locally
|
|
84
|
+
|
|
85
|
+
Download any project to work on it locally:
|
|
59
86
|
|
|
60
87
|
```bash
|
|
61
88
|
olcli pull "My Thesis"
|
|
62
89
|
cd My_Thesis/
|
|
63
90
|
```
|
|
64
91
|
|
|
65
|
-
|
|
92
|
+
Now you can edit `.tex` files with your preferred editor (Vim, VS Code, Emacs, etc.).
|
|
93
|
+
|
|
94
|
+
### 4. Edit Locally, Sync to Overleaf
|
|
66
95
|
|
|
67
96
|
```bash
|
|
68
97
|
# Edit files locally with your favorite editor
|
|
@@ -71,16 +100,22 @@ vim main.tex
|
|
|
71
100
|
# Push changes back to Overleaf
|
|
72
101
|
olcli push
|
|
73
102
|
|
|
74
|
-
# Or sync bidirectionally
|
|
103
|
+
# Or sync bidirectionally (pull + push in one command)
|
|
75
104
|
olcli sync
|
|
76
105
|
```
|
|
77
106
|
|
|
107
|
+
Your collaborators can continue using the Overleaf web editor — changes sync seamlessly.
|
|
108
|
+
|
|
78
109
|
### 5. Compile and Download PDF
|
|
79
110
|
|
|
111
|
+
Use Overleaf's remote compiler from the command line:
|
|
112
|
+
|
|
80
113
|
```bash
|
|
81
114
|
olcli pdf
|
|
82
115
|
```
|
|
83
116
|
|
|
117
|
+
The compiled PDF downloads automatically to your current directory.
|
|
118
|
+
|
|
84
119
|
## Commands
|
|
85
120
|
|
|
86
121
|
All commands auto-detect the project when run from a synced directory (contains `.olcli.json`).
|
|
@@ -103,7 +138,53 @@ All commands auto-detect the project when run from a synced directory (contains
|
|
|
103
138
|
| `olcli output [type]` | Download compile output files |
|
|
104
139
|
| `olcli check` | Show config paths and credential sources |
|
|
105
140
|
|
|
106
|
-
##
|
|
141
|
+
## Use Cases
|
|
142
|
+
|
|
143
|
+
### Local Editing with Overleaf Compilation
|
|
144
|
+
|
|
145
|
+
Work offline in your favorite editor, push when ready, compile remotely:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
olcli pull "Research Paper"
|
|
149
|
+
cd Research_Paper
|
|
150
|
+
vim introduction.tex
|
|
151
|
+
git commit -am "Update intro"
|
|
152
|
+
olcli push
|
|
153
|
+
olcli pdf
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Git Version Control + Overleaf
|
|
157
|
+
|
|
158
|
+
Keep your LaTeX project in Git while using Overleaf's compiler:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
olcli pull "My Thesis" thesis
|
|
162
|
+
cd thesis
|
|
163
|
+
git init
|
|
164
|
+
git add .
|
|
165
|
+
git commit -m "Initial import from Overleaf"
|
|
166
|
+
|
|
167
|
+
# Daily workflow
|
|
168
|
+
vim chapters/methods.tex
|
|
169
|
+
git commit -am "Draft methods section"
|
|
170
|
+
olcli sync # Sync with Overleaf
|
|
171
|
+
olcli pdf
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Automated Workflows
|
|
175
|
+
|
|
176
|
+
Integrate Overleaf compilation into CI/CD:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
#!/bin/bash
|
|
180
|
+
olcli auth --cookie "$OVERLEAF_SESSION"
|
|
181
|
+
olcli pull "Automated Report"
|
|
182
|
+
./generate-data.py > tables/results.tex
|
|
183
|
+
olcli push
|
|
184
|
+
olcli pdf -o report-$(date +%Y-%m-%d).pdf
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### arXiv Submissions
|
|
107
188
|
|
|
108
189
|
Download the `.bbl` file for arXiv submissions:
|
|
109
190
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aloth/olcli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Overleaf
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Command-line interface for Overleaf — Sync, manage, and compile LaTeX projects from your terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"olcli": "dist/cli.js"
|
|
@@ -14,13 +14,24 @@
|
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"overleaf",
|
|
17
|
+
"overleaf-cli",
|
|
17
18
|
"latex",
|
|
19
|
+
"latex-cli",
|
|
18
20
|
"cli",
|
|
21
|
+
"command-line",
|
|
19
22
|
"sync",
|
|
20
23
|
"tex",
|
|
21
24
|
"pdf",
|
|
22
25
|
"academic",
|
|
23
|
-
"writing"
|
|
26
|
+
"writing",
|
|
27
|
+
"latex-editor",
|
|
28
|
+
"overleaf-sync",
|
|
29
|
+
"research",
|
|
30
|
+
"compile",
|
|
31
|
+
"arxiv",
|
|
32
|
+
"terminal",
|
|
33
|
+
"typescript",
|
|
34
|
+
"latex-tools"
|
|
24
35
|
],
|
|
25
36
|
"author": "Alexander Loth <alex@alexloth.com> (https://alexloth.com)",
|
|
26
37
|
"license": "MIT",
|