An almost entirely vibe-coded local LaTeX editor with live PDF preview and AI-powered editing. Built with Electron, React, and TypeScript. This was mostly to learn Electron wrapping, testing out Kiro and shipping an executeable.
- Auto-compile: Automatically compiles LaTeX as you type (configurable delay)
- Live PDF preview with real-time compilation
- Monaco Editor (VS Code editor) with LaTeX syntax highlighting
- Resizable split panes for optimal workflow
- Manual compile option with compile button
- Multiple themes: Dark, Light, and Glassy themes with smooth transitions
- Context-aware LaTeX completions for faster editing
- AI Document Editor: Natural language document editing with LLM integration
- Describe changes in plain English
- Review and apply suggested edits
- Supports multiple LLM providers (OpenAI, Anthropic, Google Gemini, Ollama)
- Error Analysis: AI-powered LaTeX error diagnosis and fixes
- Smart Context Engine: Intelligent LaTeX command suggestions based on document context
- Windows, macOS, and Linux support
- Native desktop application with Electron
Install a LaTeX distribution:
More releases coming soon - releases will be available at Releases
git clone https://github.com/mannrp/underleaf.git
cd underleaf
npm install
npm run electron:devnpm run dev # Vite dev server
npm run electron:dev # Electron development
npm run build # Build for production
npm run electron:build # Package for distribution- React 18 + TypeScript
- Monaco Editor
- Electron
- Zustand (state)
- Tailwind CSS
- Vite
- Open/Create: Click "Open" to load a .tex file or start typing in the editor
- Auto-compile: Toggle the "Auto" button (⚡) to enable/disable automatic compilation
- Manual compile: Click "Compile" button to manually compile your document
- Save: Click "Save" to save your work (auto-compile requires saved files)
- Theme: Open Settings to switch between Dark, Light, and Glassy themes
The auto-compile feature will automatically save and compile your document after you stop typing, keeping the PDF preview always up-to-date.
- Setup: Open Settings and configure your preferred LLM provider (API key required for cloud providers)
- AI Chat: Click the panel toggle button to open the AI Document Editor
- Edit with AI: Describe changes in natural language (e.g., "Add a section about methodology")
- Review & Apply: Review suggested changes and apply or reject them
- Error Help: When compilation fails, the error panel provides AI-powered analysis and fixes
Underleaf supports multiple AI providers:
- OpenAI: GPT-4, GPT-3.5-turbo
- Anthropic: Claude 3 models
- Google Gemini: Gemini Pro
- Ollama: Local models (no API key required)
Configure in Settings → AI Provider section.
Compilation fails: Ensure LaTeX is installed and pdflatex is in PATH
PDF not showing: Check compilation succeeded and PDF exists
Auto-compile not working: Make sure file is saved first (has a file path)
App won't start: Use Node.js 18+, try rm -rf node_modules && npm install
AI features not working: Verify API key is set correctly in Settings
Theme not changing: Restart the app if theme doesn't apply immediately
MIT