โ† Back to Projects
โšก WebAssembly (Browser) ๐Ÿ’ป Local Agent (Linux, macOS and Windows)

Compilation Engines in NeoLeaf

Understand the difference between compiling in the browser and the native local agent, and learn how to choose the best option for your project.

Checking for the local agent on this machine... Testing the local connection at 127.0.0.1:47474...

๐ŸŽฏ Comparison: WebAssembly vs. Local Agent

NeoLeaf was designed with a Client-First & Privacy by Design philosophy: unlike traditional platforms that send your papers to queues on remote servers, in NeoLeaf compilation happens right in the user's hands.

โšก WebAssembly (Browser)
NeoLeaf default ยท No installation
  • 100% in the browser: Compilation with TeX Live WebAssembly (texlive-wasm / BusyTeX) run by your device's processor.
  • Absolute privacy: No code, confidential text or research data is sent to the server for compilation.
  • Zero dependencies: Works in any modern browser (Chrome, Firefox, Safari, Edge) on any operating system (Linux, macOS, Windows).
  • Fonts and packages on demand: Common packages and math fonts are downloaded and kept in the IndexedDB cache.
Feature โšก WebAssembly (Browser) ๐Ÿ’ป Local Agent (neoleaf-agent)
Where compilation runs In the user's browser tab Natively on the user's machine
Sends TeX code to the server? Never (100% private) Never (100% private)
Requires prior installation None (open and use) Yes (requires a local TeX Live or Tectonic)
Supported engines pdfLaTeX (wasm) pdfLaTeX, XeLaTeX, LuaLaTeX, Tectonic
Operating system fonts Only bundled packages Any font installed on the system
Automatic package installation Download via web cache (.tar.gz) Automatic via the local tlmgr
Operating systems Any OS (Linux, Windows, Mac, mobile) Linux (x86_64), macOS (Intel and Apple Silicon) and Windows 10/11

๐Ÿ“ฆ Download and Install the Local Agent

The neoleaf-agent is a lightweight, secure executable written in Rust. It listens only on 127.0.0.1:47474, accepts only requests coming from NeoLeaf (https://neoleaf.science) and requires a one-time pairing code to authorize access.

Download neoleaf-agent for Linux (x86_64) (~2.5 MB)
Download for macOS (Intel and Apple Silicon) ยท Download for Windows 10/11 (x86_64)

Quick install (one command)

Copy and paste into the terminal. The script downloads the agent, checks the SHA-256, installs it in ~/.local/bin and registers your user's service (no sudo). If the machine has no LaTeX, it offers to install TinyTeX.

curl -fsSL https://neoleaf.science/install.sh | sh

Linux x86_64 and macOS (Intel and Apple Silicon), no sudo. On macOS the agent becomes a LaunchAgent of your user. The script checks the download's SHA-256. View the script

Windows (PowerShell)

irm https://neoleaf.science/install.ps1 | iex

Windows 10 or 11, no administrator. Installs in %LOCALAPPDATA%\Programs\neoleaf-agent and starts with your session. The script checks the download's SHA-256. View the script

Prefer to download the file and install it by hand? Use the steps below.

Step 1: Install as a user service (systemd)

After downloading the file to your Downloads folder, open the terminal and run:

chmod +x neoleaf-agent-linux-x86_64 ./neoleaf-agent-linux-x86_64 install

The install command registers the agent with systemd --user to start automatically with your session and enables the tray icon (StatusNotifierItem / Tray). On macOS, the file is neoleaf-agent-macos-universal and the service is a LaunchAgent (no tray icon); prefer the one-line command above.

Step 2: Pairing in the Editor

Open your project in NeoLeaf. The ๐Ÿ’ป Local (pdfLaTeX / XeLaTeX / LuaLaTeX / Tectonic) engine will appear in the compilation selector in the top bar. When you click to compile for the first time, the agent:

Useful Agent Commands

# Generate a pairing code (valid for 5 minutes and can be used only once) ./neoleaf-agent-linux-x86_64 code # List the paired browsers and revoke access for one of them (or all) ./neoleaf-agent-linux-x86_64 devices ./neoleaf-agent-linux-x86_64 revoke # List the compilers found on your machine ./neoleaf-agent-linux-x86_64 engines # Install TinyTeX (lean LaTeX, for your user only) if the machine has no compiler ./neoleaf-agent-linux-x86_64 install-tinytex # Update the agent (downloads the version published on the site, checks the SHA-256 and restarts the service) neoleaf-agent update # Choose: notify about updates (default), update automatically or do not check neoleaf-agent auto-update notify|on|off # Show the version, whether the service is installed and whether it is running neoleaf-agent status # Uninstall and remove the system service ./neoleaf-agent-linux-x86_64 uninstall

๐Ÿ”’ Local Agent Security