Lightweight, zero-dependency web-based LaTeX editor. Powered by TeX Live Docker images.
- 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
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)
tinyleafusage: 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: 8080)
--host HOST Server host (default: 127.0.0.1)
--no-browser Don't auto-open browser on start
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)
| Shortcut | Action |
|---|---|
Ctrl+S |
Save current file |
Ctrl+Enter |
Compile |
Ctrl+Shift+C |
Git commit |
Ctrl+Shift+P |
Git push |
For a self-contained setup with Docker compilation:
docker compose upThis starts the web editor on http://localhost:8080 with a persistent TeX Live container for compilation.
MIT