A lightweight, self-hosted Overleaf alternative — zero-dependency LaTeX web editor
Project description
tinyleaf
A lightweight, self-hosted Overleaf alternative that runs entirely from a single pip install. No database, no Node.js, no Docker required — just Python's standard library and a TeX Live installation. One command to start editing LaTeX in your browser.
pip install tinyleaf && tinyleaf /path/to/my-thesis
Features
- CLI-first —
pip install tinyleaf && tinyleaf /pathto start editing - Two modes — Single project or multi-project with registry (
~/.config/tinyleaf/projects.json) - Two compilation backends — Local
latexmk(default) or Docker - CodeMirror 6 editor with LaTeX syntax highlighting
- PDF.js preview with live reload after compilation
- SSE real-time compilation log streaming
- Git integration — auto-detect
.git, commit/push from UI - Zero Python dependencies — stdlib only (
http.server+threading+subprocess) - 7 themes with dark/light toggle
- i18n — English and Chinese
Quick Start
pip install tinyleaf
# Single project mode (local compilation)
tinyleaf /path/to/my-thesis
# Single project mode (Docker compilation)
tinyleaf /path/to/my-thesis --docker
# Multi-project mode (registry)
tinyleaf
Usage
usage: tinyleaf [-h] [--projects-dir DIR] [--config-dir DIR] [--docker]
[--image IMAGE] [--port PORT] [--host HOST] [--no-browser]
[project_path]
positional arguments:
project_path Single project directory to open
options:
--config-dir DIR Config directory for project registry
(default: ~/.config/tinyleaf)
--projects-dir DIR Legacy: migrate subdirs into registry
--docker Use Docker for compilation (default: local latexmk)
--image IMAGE Docker image to use (default: oaklight/texlive:latest)
--port PORT Server port (default: 14159, env: TINYLEAF_PORT)
--host HOST Server host (default: 127.0.0.1)
--no-browser Don't auto-open browser on start
Multi-Project Registry
When launched without a project_path, tinyleaf enters multi-project mode. Projects are tracked in ~/.config/tinyleaf/projects.json — each entry maps a name to an absolute path anywhere on the filesystem.
From the project page you can:
- Open Folder — browse the server filesystem and register an existing directory
- New Project — create a new project at a chosen location
- Remove — unregister a project (optionally delete files)
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+S |
Save current file |
Ctrl+Enter |
Compile |
Ctrl+Shift+C |
Git commit |
Ctrl+Shift+P |
Git push |
Docker Compose
For a self-contained setup with Docker compilation:
docker compose up
This starts the web editor on http://localhost:14159 with a persistent TeX Live container for compilation.
Why tinyleaf?
| tinyleaf | Overleaf CE | |
|---|---|---|
| Install | pip install tinyleaf |
Docker Compose (MongoDB + Redis + Node + CLSI + …) |
| Dependencies | Zero (Python stdlib only) | 6+ services |
| Memory | ~30 MB | ~1 GB+ |
| Startup | Instant | Minutes |
| Compilation | Local latexmk or Docker |
Built-in CLSI |
| Git | Built-in UI | Server-side Git bridge |
| Collaboration | Single-user | Multi-user |
tinyleaf is designed for individual users who want a browser-based LaTeX editing experience without the operational overhead of a full Overleaf deployment.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinyleaf-0.4.0.tar.gz.
File metadata
- Download URL: tinyleaf-0.4.0.tar.gz
- Upload date:
- Size: 84.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7a6d80b154cddc4dd2344162fb18ea66534fe40b2b3c8db178d427cc8514a5d
|
|
| MD5 |
32689e253e3092657833a5cf2e96a232
|
|
| BLAKE2b-256 |
7aa36caa4179f0f0b7e4862a868ac59f13cf42aa1b3fb46fb9c1fab43acf3baa
|
File details
Details for the file tinyleaf-0.4.0-py3-none-any.whl.
File metadata
- Download URL: tinyleaf-0.4.0-py3-none-any.whl
- Upload date:
- Size: 86.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8c0f036ca1ec49d1af2a8a7fc0d0a405570fdb66c4e8d2656c2d4db770394a4
|
|
| MD5 |
06d3afc3b99b3dbecf5b220f2babd7a1
|
|
| BLAKE2b-256 |
74a24ff5fc410de253ca5b1a6d778b6228bd4eb2c13e087d00de920303e11b76
|