Skip to main content

tinyleaf

Tinyleaf

PyPI version GitHub release CI License: AGPL v3 Documentation

中文版 | Documentation | Brand assets

Tinyleaf is a tiny, local-first TeX editor that runs in your browser.

It is built for people who want an Overleaf-like editing experience without running a full Overleaf stack. Install one Python package, point it at a LaTeX project, and edit from a clean web UI with PDF preview, compile logs, Git tools, search, outline, and multi-tab editing.

pip install tinyleaf

# Open one project. Docker-based TeX Live compilation is enabled by default.
tinyleaf /path/to/my-thesis

# Or use a local TeX installation instead.
tinyleaf /path/to/my-thesis --no-docker

# Launch the project registry.
tinyleaf

Why Tinyleaf?

Tinyleaf sits between a local editor and a full collaborative LaTeX platform:

  • Local-first — your projects stay on your filesystem
  • Self-hosted — run it on your laptop, workstation, lab server, or VPS
  • Small runtime — no database, no Node.js service, no Redis, no MongoDB
  • Browser UI — CodeMirror editor, PDF preview, file tree, Git panel, and settings
  • Flexible compilation — Dockerized TeX Live by default, or local latexmk with --no-docker
  • Single-user focused — designed for individual writing workflows, not a multi-user SaaS clone

Features

Editing

  • CodeMirror 6 editor with LaTeX syntax highlighting
  • Multi-tab editing with quick open (Ctrl+P)
  • Auto-pair \begin{...} / \end{...}
  • Project-wide search
  • LaTeX outline sidebar with recursive \input / \include support
  • \ref{}, \cite{}, and \label{} autocomplete from project symbols

PDF and compilation

  • PDF.js preview with live reload
  • Page navigation, zoom controls, and text search
  • Real-time compile logs over SSE
  • Clickable file.tex:line entries in compile output
  • SyncTeX forward/reverse search
  • Word/page statistics via texcount
  • Export project as ZIP

Projects and workflow

  • Single-project mode: open any directory directly
  • Multi-project registry stored at ~/.config/tinyleaf/projects.json
  • File tree with create, upload, rename, delete, and search
  • Git status, diff, commit, push, pull, and log from the UI
  • 7 UI themes with light/dark mode
  • English and Chinese UI

Installation

pip install tinyleaf

Tinyleaf has zero Python runtime dependencies beyond the standard library. The web editor assets are bundled with the package.

For compilation, choose one of:

Backend Command Requirements
Docker TeX Live tinyleaf /path/to/project Docker installed
Local TeX Live tinyleaf /path/to/project --no-docker latexmk available in PATH

Usage

usage: tinyleaf [-h] [-V] [--projects-dir DIR] [--config-dir DIR]
                [--browse-root DIR]
                [--token TOKEN | --token-file FILE] [--allowed-host HOST]
                [--read-only] [--insecure-no-auth]
                [--json | --print-url] [--pid-file PATH]
                [--log-file PATH] [--log-level LEVEL]
                [--docker | --no-docker] [--image IMAGE] [--port PORT]
                [--host HOST] [--no-browser]
                [project_path]

Common examples:

# Open a project and compile with Docker.
tinyleaf ~/papers/my-paper

# Use local latexmk instead of Docker.
tinyleaf ~/papers/my-paper --no-docker

# Bind to all interfaces on a server. Off loopback a token is required.
printf '%s' "$(openssl rand -hex 24)" > ~/.tinyleaf-token
chmod 600 ~/.tinyleaf-token
tinyleaf ~/papers/my-paper --host 0.0.0.0 --port 14159 \
    --token-file ~/.tinyleaf-token --allowed-host papers.example.com

# First browser login: open http://SERVER:14159/?token=THE_TOKEN once.
# Scripts can send: Authorization: Bearer THE_TOKEN

# Start the multi-project registry view.
tinyleaf

Multi-project registry

When launched without a project_path, Tinyleaf opens a project registry. The registry maps project names to absolute paths anywhere on the filesystem.

From the project page you can:

  • Open Folder — register an existing directory
  • New Project — create a new project at a chosen location
  • Remove — unregister a project, optionally deleting files
  • Switch views — grid/list layout with persistent preferences

Keyboard shortcuts

Shortcut Action
Ctrl+S Save current file
Ctrl+Enter Compile
Ctrl+P Quick open
Ctrl+Shift+F Project search
Ctrl+Shift+C Git commit
Ctrl+Shift+P Git push
Ctrl+/ Shortcut help

Docker Compose

For a simple containerized setup:

export TINYLEAF_TOKEN="$(openssl rand -hex 24)"
docker compose up

Compose refuses to start without TINYLEAF_TOKEN because the container binds 0.0.0.0. Tinyleaf starts at http://localhost:14159; the first browser visit must include the token:

http://localhost:14159/?token=$TINYLEAF_TOKEN

If clients use a different hostname or IP, set TINYLEAF_ALLOWED_HOST to that value before starting Compose.

Tinyleaf vs. Overleaf CE

Tinyleaf Overleaf CE
Primary use case Personal/local TeX editing Multi-user collaborative platform
Install pip install tinyleaf Docker Compose stack
Runtime services Python stdlib server MongoDB, Redis, Node.js, CLSI, etc.
Project storage Your filesystem Application-managed storage
Compilation Docker TeX Live or local latexmk CLSI service
Git workflow Built-in lightweight UI Git Bridge
Collaboration Single-user focused Multi-user

Tinyleaf is not trying to replace the full Overleaf collaboration model. It is for writers who want a fast, self-hosted browser editor for their own TeX projects.

Documentation

License

AGPL-3.0-or-later

Metadata

Release files for tinyleaf 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinyleaf 0.8.0
File Size Uploaded Provenance Actions
tinyleaf-0.8.0.tar.gz 180.7 kB With provenance Details for tinyleaf-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tinyleaf 0.8.0
File Interpreter ABI Platform Actions
tinyleaf-0.8.0-py3-none-any.whl Python 3 none any Details for tinyleaf-0.8.0-py3-none-any.whl

Total release size: 347.4 kB

Release files / tinyleaf-0.8.0.tar.gz

Download URL tinyleaf-0.8.0.tar.gz
Size 180.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ad0b06aa6facf6bc045ee45d69596c6ff548af442dc252292cdb0e5c6015fa38
BLAKE2b-256 checksum
How to use checksums
bedc8e43875cd4b4ae1e729fbb54552df19ae0f050a16e3e9ff90ec96e829da1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / tinyleaf-0.8.0-py3-none-any.whl

Download URL tinyleaf-0.8.0-py3-none-any.whl
Size 166.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6036ad2973312305fd7c01a1671e95876f6a1d2b4fa1f87c0a50f8f8fd27b421
BLAKE2b-256 checksum
How to use checksums
2bb0ca591016e176f9954896f7c18104a989057dfdd1812d499d2343ece0b401
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for tinyleaf 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tinyleaf-0.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page