A native LaTeX editor with remote compilation support and local Docker rendering.
Treefrog is a desktop application providing a complete LaTeX editing and compilation environment:
- Monaco Editor - Syntax highlighting and LaTeX autocompletion
- Live PDF Preview - Real-time PDF viewer with SyncTeX support (click to navigate)
- Git Integration - Version control operations within the editor
- Remote Compilation - Offload builds to a remote compiler service
- Local Docker Renderer - Optional bundled LaTeX compilation environment
- Project Management - File browser and multi-file project support
Homebrew (recommended):
brew install treefrog/tap/treefrogInstall script:
curl -fsSL https://raw.githubusercontent.com/alpha-og/treefrog/main/scripts/install.sh | bashDownload directly: Download the DMG from GitHub Releases
Arch Linux (AUR):
yay -S treefrog-binInstall script:
curl -fsSL https://raw.githubusercontent.com/alpha-og/treefrog/main/scripts/install.sh | bashDownload directly: Download the tarball from GitHub Releases
Download the ZIP from GitHub Releases
# Install specific version
curl -fsSL https://raw.githubusercontent.com/alpha-og/treefrog/main/scripts/install.sh | bash -s -- --version v1.0.0
# Install to custom location
curl -fsSL https://raw.githubusercontent.com/alpha-og/treefrog/main/scripts/install.sh | bash -s -- --prefix ~/.local
# Uninstall
curl -fsSL https://raw.githubusercontent.com/alpha-og/treefrog/main/scripts/install.sh | bash -s -- --uninstall- Go 1.24+
- Node.js 22+ and pnpm 9+
- Wails CLI:
go install github.com/wailsapp/wails/v2/cmd/wails@latest - Docker (optional, for local rendering)
pnpm install # Install all dependencies
pnpm dev # Start desktop app with local compiler
pnpm doctor # Verify development environmentpnpm build # Build for current platform
pnpm build:all # Build for macOS, Windows, LinuxBuilt binaries are in apps/desktop/build/bin/
treefrog/
├── apps/
│ ├── local-latex-compiler/ # Local LaTeX compiler (no auth, pure rendering)
│ │ ├── cmd/server/ # HTTP server entry point
│ │ ├── internal/ # Private packages (storage, cleanup)
│ │ ├── Dockerfile # Server container
│ │ └── compose.yml # Docker Compose config
│ │
│ ├── remote-latex-compiler/ # Remote SaaS compiler (auth, billing)
│ │ ├── cmd/server/ # HTTP server entry point
│ │ ├── internal/ # Private packages (auth, billing, build, etc.)
│ │ ├── Dockerfile # Server container
│ │ └── compose.yml # Docker Compose config
│ │
│ ├── local-cli/ # Standalone local LaTeX compiler CLI
│ │ └── cmd/main.go # CLI entry point
│ │
│ ├── desktop/ # Wails desktop application
│ │ ├── frontend/ # React frontend (React 19)
│ │ ├── app.go # Application configuration
│ │ ├── bindings.go # Go to frontend bindings
│ │ ├── docker.go # Docker lifecycle management
│ │ └── wails.json # Wails configuration
│ │
│ └── website/ # Marketing website (React 19)
│
├── packages/
│ ├── types/ # @treefrog/types - Shared TypeScript types
│ ├── services/ # @treefrog/services - API clients
│ ├── supabase/ # @treefrog/supabase - Database client
│ ├── ui/ # @treefrog/ui - Shared React components
│ └── go/ # Shared Go packages
│ ├── build/ # DockerCompiler, Build types
│ ├── config/ # Environment variable helpers
│ ├── http/ # HTTP client factory
│ ├── logging/ # Shared logger initialization
│ ├── security/ # Path traversal validation
│ ├── signer/ # URL signing utility
│ ├── synctex/ # SyncTeX parser
│ └── validation/ # UUID validation
│
├── scripts/ # Development and build scripts
├── go.work # Go workspace configuration
├── pnpm-workspace.yaml # pnpm monorepo configuration
└── vercel.json # Vercel deployment config
# Development
pnpm dev # Start desktop app with local compiler
pnpm dev:desktop-local # Desktop + Local compiler (no auth)
pnpm dev:desktop-remote # Desktop + Remote compiler (auth required)
pnpm dev:website # Website only
pnpm dev:compiler # Remote compiler only
# Service Management
pnpm dev:status # Show status of all services
pnpm dev:stop # Stop services
pnpm dev:logs <service> # View logs
# Building
pnpm build # Build desktop app for current platform
pnpm build:all # Build for macOS, Windows, Linux
pnpm build:docker # Build Docker images
pnpm build:backend # Build remote compiler binary
pnpm build:cli # Build local CLI
# Production
pnpm prod:compiler # Start remote compiler (production)
pnpm prod:stop # Stop production services
pnpm prod:logs # View production logs
# Testing
pnpm test # Run all tests
pnpm test:backend # Run Go tests
pnpm test:frontend # Run frontend tests
# Code Quality
pnpm lint # Lint all code
pnpm fmt # Format all code
pnpm typecheck # Type check TypeScript
# Diagnostics
pnpm doctor # Check development environment
pnpm clean # Clean build artifacts
pnpm clean:all # Deep clean (removes node_modules)Run pnpm env:setup to create .env.local from the template.
Remote Compiler (apps/remote-latex-compiler/.env.local):
DATABASE_URL- PostgreSQL connection stringSUPABASE_URL- Supabase project URLSUPABASE_SECRET_KEY- Supabase service role key (SECRET)REDIS_URL- Redis connection stringRAZORPAY_*- Payment configuration (SECRETS)COMPILER_SIGNING_KEY- URL signing secret (SECRET)
Desktop & Website (VITE_* vars are safe, client-side):
VITE_SUPABASE_URL- Supabase project URLVITE_SUPABASE_PUBLISHABLE_KEY- Supabase anon key (public-safe)VITE_API_URL- Backend API URLVITE_WEBSITE_URL- Website URL
Each compiler has its own compose.yml:
# Local compiler (no auth)
cd apps/local-latex-compiler && docker compose up
# Remote compiler (requires .env.local)
cd apps/remote-latex-compiler && docker compose upOr use the pnpm scripts:
pnpm dev:local # Local compiler on port 8080
pnpm prod:compiler # Remote compiler on port 9000- Monaco Editor with LaTeX syntax highlighting
- Live PDF viewer with SyncTeX support
- Native file browser
- Git integration (status, commit, push, pull)
- Multiple TeX engines: pdflatex, xelatex, lualatex
- Local Docker rendering with health checks
- Delta-sync caching for faster builds
pnpm doctor # Verify dependencies
pnpm install # Reinstall dependencies- Verify Compiler URL is accessible
- Check API token in Settings
- Enable shell-escape if required
- Check compiler logs:
pnpm dev:logs remote-compiler
- Verify Docker is running
- Check port availability
- Review error logs in Settings
- Never commit
.env.localfiles (gitignored) - All
VITE_*variables are client-side and public-safe - Server secrets go in
apps/remote-latex-compiler/.env.local
MIT