A local, Overleaf-style LaTeX editor inspired by OpenPrism and OpenAI Prism. Write LaTeX on the left, see your compiled PDF on the right — with an AI assistant that can rewrite your document from natural language instructions.
![Dark mode split view with file tree, editor, PDF preview, and AI panel]
- Split view — LaTeX source editor alongside live PDF preview
- File tree — open and manage an entire project folder with multiple files
- Multi-tab editor — open several
.texfiles at once, with unsaved-change indicators - One-click compile —
⌘+Entersaves and compiles viapdflatex - AI assistant — describe a change in plain English; Claude rewrites your LaTeX and lets you Apply or Discard
- Streaming AI responses — output appears word by word, just like a chat interface
- Light / Dark mode — toggle in the top bar, preference saved across sessions
- Resizable panes — drag any panel border to adjust widths
- Right-click context menu — rename or delete files directly from the tree
Python 3.8 or later. Check with:
python3 --versionBasicTeX (lightweight, ~140 MB) or full MacTeX (~5 GB):
# Recommended: BasicTeX
brew install --cask basictex
# After installing, reload your PATH:
eval "$(/usr/libexec/path_helper)"If your document uses extra packages (e.g. acmart, beamer), install them with:
sudo tlmgr update --self
sudo tlmgr install <package-name>Common packages:
sudo tlmgr install acmart beamer biblatex collection-fontsrecommendedAn Anthropic API key — paste it into Settings (⚙) inside the editor. The key is stored locally in your browser and never sent anywhere except api.anthropic.com.
git clone https://github.com/YOUR_USERNAME/latex-editor.git
cd latex-editor
bash run.shThe launcher will:
- Create a Python virtual environment
- Install
flaskandanthropicautomatically - Open
http://localhost:8080in your browser
By default the editor opens the project/ folder inside the repo. To open your own folder:
bash run.sh /path/to/my/paper| Shortcut | Action |
|---|---|
⌘ Enter |
Compile current file |
⌘ S |
Save current file |
⌘ K |
Toggle AI assistant panel |
- Click the ⌘K button (top right) or press
⌘Kto open the AI panel - Enter your Anthropic API key in Settings (⚙) if you haven't already
- Type an instruction, e.g.:
- "Add a table of contents"
- "Change the font size to 12pt"
- "Add a bibliography section with BibTeX"
- "Convert the itemize list to a numbered list"
- Click Apply to replace your source with the AI's version — it compiles automatically
- New file / folder — use the
+buttons in the file tree header - Rename / Delete — right-click any file or folder
- Files with unsaved changes show a
•dot on their tab
latex-editor/
├── app.py # Flask server (compile, file API, AI streaming)
├── run.sh # One-click launcher
├── templates/
│ └── index.html # Full editor UI (single-file, no build step)
├── project/ # Default project folder (your .tex files go here)
└── README.md
pdflatex not found
BasicTeX was installed but the PATH hasn't updated. Run:
eval "$(/usr/libexec/path_helper)"Then restart the server.
File 'somepackage.cls' not found
Install the missing package:
sudo tlmgr install somepackagePort already in use
macOS AirPlay uses port 5000. The editor runs on 8080 by default. If 8080 is also taken, edit the last line of app.py and change port=8080.
AI returns an error
Check that your API key is correct in Settings (⚙). Keys start with sk-ant-.
MIT