GitLaTeX IDE
A local, Git-native LaTeX editor that runs in your browser.
Write in a Monaco editor, compile to PDF, and push to GitHub — without Overleaf, without a subscription, and without leaving your own machine.
Why GitLaTeX
Overleaf is excellent until you want your files on your own disk, your own Git
remote, and no upload limits. GitLaTeX gives you the same shape of workflow —
editor, live PDF, one-click compile — but everything runs locally against a real
Git repository. Your .tex files are just files, and your history is just Git.
- Your files stay yours. Plain folders on your disk, versioned with real Git.
- No account, no subscription, no upload cap.
- Compiles locally, so your unpublished work never leaves your machine.
- One command to start.
pip install gitlatex && gitlatex.
The editor itself (Monaco), the icon set and the web fonts are loaded from a CDN, so the interface needs a network connection the first time it is opened on a machine. Everything else — your files, compiling, and Git — is local.
Installation
pip install gitlatex
Requirements
| Python | 3.8 or newer |
| LaTeX | A distribution providing pdflatex — TeX Live, MiKTeX, or MacTeX |
| Git | Required for cloning, pushing and version history |
LaTeX and Git are optional if you only want to edit files, but compiling and the
Git features need them on your PATH.
Quick start
gitlatex
Your browser opens at http://localhost:5000. Clone a repository or create a local folder, open it, and start writing. Changes save automatically as you type.
Command line options
| Option | Description |
|---|---|
--port, -p |
Port to serve on (default: 5000) |
--host |
Bind address (default: 127.0.0.1) |
--no-browser |
Do not open a browser on start |
--repos |
Where projects live (default: ./repos in the current directory) |
gitlatex --port 3000 --repos ~/Documents/papers
Features
Editor
Built on Monaco, the editor that powers VS Code.
- LaTeX and BibTeX syntax highlighting with themes tuned for both — commands, environment names, math delimiters, labels and citation keys each get their own colour, in light and dark.
- Autocomplete for 150+ LaTeX commands and 50+ environments. Inside
\ref{}and\cite{}it completes from your project's actual labels and.bibkeys, showing the title, author and year of each entry as you pick. - BibTeX IntelliSense — entry types after
@, and field names inside an entry. - Document outline of every chapter, section and subsection, tracking your cursor and jumping you anywhere in the file with a click.
- Matched
\begin/\endcolouring so nested environments are obvious at a glance, and you can see immediately when one is left unclosed. - Autosave — edits are written to disk shortly after you stop typing.
Spell checking
- Unknown words in
.tex,.txtand.mdare underlined as you type. - LaTeX-aware: comments, math (
$...$,equation,align, …), verbatim blocks, and the arguments of\ref,\cite,\url,\includegraphicsand friends are all skipped, so you only get flagged on actual prose. - Built for papers: prefixed and hyphenated coinages (
nanowire,ferromagnets,anti-symmetric) resolve against their parts instead of being flagged, and US spellings the base dictionary omits are included. - Fix from the lightbulb or
Ctrl+., or add a word to your personal dictionary — it persists across projects and sessions.
Compiling
- One click to PDF, with the result shown in a pane beside the editor.
- Full multi-pass builds — the engine runs,
biberorbibtexruns when your document needs it, then the engine reruns until cross-references and citations settle. No more compiling three times by hand to clear??. - Choose your engine:
pdflatex,xelatexorlualatex. - A real problems list. Errors and warnings are parsed out of the LaTeX log into a clickable list — click one to jump straight to the line, with squiggles in the editor to match.
- Pick the main file when your project has more than one
.tex, so compiling a chapter always builds the root document.
Git and version history
- Status, diff, pull and push from the toolbar. Push asks for a commit message
(default:
Update LaTeX project), then stages everything, commits and pushes. Edit the message or accept the default; Cancel or Escape stops the operation. Submitting an empty message also cancels. If the working tree is clean, existing commits are pushed without creating an empty commit. - Pull and push enable themselves only when there is something to do, with ahead/behind counts read from the remote.
- Version history panel listing your commits, with the files each one touched and per-file insertion/deletion counts.
- Side-by-side diffs for any file in any commit, for your uncommitted working tree, or between any two commits you select.
Settings
- Light and dark themes, applied to the whole app and the editor together.
- Spell check on or off.
- Remote Compiler API — point GitLaTeX at a web service that compiles LaTeX and it will build there instead of locally, so you do not need a TeX distribution installed at all. The app ships with full documentation for building one at Settings → Compiler API. If the API also returns the SyncTeX file, PDF ↔ source sync works for those builds too.
- Tells you when a newer GitLaTeX is on PyPI.
Advanced editing
PDF ↔ source sync (SyncTeX)
- Source → PDF:
Cmd+click (macOS) orCtrl+click a line in the editor, or right-click → Show in PDF, and the PDF viewer scrolls to that spot and highlights it. - PDF → source: double-click anywhere in the PDF to open the matching
.texfile and jump to the line, which flashes briefly so you can find it. - Works with any file in a multi-file project, not only the main file.
- Reads the
.synctex.gzfile written by the last compile with a built-in reader, so no TeX installation is needed for the jump itself. Local builds always write it; with a remote Compiler API it works when the API returns the file too (see Settings → Compiler API). - After editing, positions can be a few lines off until you compile again.
Snippets
- Create your own prefix → LaTeX expansions in Settings → Snippets, or select text in the editor and right-click → Save Selection as Snippet.
- Type a prefix and press
Tab, or pick it from the suggestion list. - Bodies use tab stops and placeholders —
$1,${1:default},${1|a,b|},$0— so onefigcan expand into a full figure environment with the cursor hopping between caption and label. - Limit a snippet to
.tex,.bibor all files. - Snippets are saved in
~/.gitlatex/snippets.json, so every project and browser shares them. Export and Import move them between machines, and Import also accepts VS Code snippet files.
Vim mode with VimTeX-style mappings
Turn on Settings → Editor → Vim keybindings for normal, insert and visual
modes, with :w to save. On top of that, the parts of
VimTeX people use every day:
| Keys | |
|---|---|
| Text objects | ie/ae environment · i$/a$ math · ic/ac command · id/ad delimiters · iP/aP section |
| Motions | ]] [[ sections · ]m [m \begin · ]M [M \end · ]n [n math · % jumps between \begin and \end |
| Delete / change / toggle | dse cse tse environment · dsc csc tsc command · ds$ cs$ ts$ math · dsd tsd \left…\right · tsf \frac{a}{b} ↔ a/b |
| Leader commands | \ll compile · \lv show in PDF · \lt outline · \le errors |
| Insert mode | ]] closes the current environment |
| Ex commands | :VimtexCompile · :VimtexView · :VimtexToc · :VimtexErrors |
Comments are ignored when matching environments, so a commented-out \begin
never pairs with a real \end. The full table is also in Settings.
Review comments
An Overleaf-style review panel for leaving comments on your text.
- Add a comment: select some text (or put the cursor on a line) and click
Add comment in the panel, press
Cmd+Option+M/Ctrl+Alt+M, or right-click → Add Comment. - Open the panel with the Review button in the toolbar. Its badge shows how many comments are open in the current file.
- Comment cards line up with the text they are about and scroll with the editor. Commented text is highlighted, with a marker in the margin.
- Hover over commented text to see a preview of the comment. Click the preview to open that thread in the review panel.
- Reply (
Entersends,Shift+Enteradds a new line), resolve or reopen, and delete threads or your own replies. Tick Resolved in the panel to show resolved threads. - Comments are signed with your git identity (
user.nameanduser.email), the same one your commits use. - Shared through Git. Each thread is a small JSON file in
.gitlatex/comments/inside the project, so comments are pushed and pulled with your files. Each thread has its own file, so two people starting threads at the same time won't get merge conflicts. - Comments stay attached to their text as you edit, find it again after a pull, and follow a file when you rename it. Deleting a file removes its comments.
Workflow
- Run
gitlatex. - Add a project — clone from a Git URL, or create a local folder.
- Open it and edit. The file tree supports creating, renaming, moving (drag and drop), deleting and uploading.
- Compile to build the PDF and see any problems.
- Push when you are ready.
Projects live in ./repos unless you pass --repos.
Troubleshooting
| Problem | Fix |
|---|---|
| Compile fails immediately | Install a LaTeX distribution and make sure pdflatex is on your PATH. |
Citations show as ?? |
Install biber (for biblatex) or bibtex with your TeX distribution. |
| Port already in use | Run on another port: gitlatex --port 3000. |
| Show in PDF / double-click says "No SyncTeX data" | Compile first. With a Compiler API, the API must return synctex alongside the PDF — see Settings → Compiler API. |
| Comments are signed "Anonymous" | Set your git identity: git config --global user.name "Your Name". |
| Spell check unavailable | pip install symspellpy — it ships as a dependency, but a partial install can miss it. |
| Windows: "The process cannot access the file… gitlatex.exe" | Another instance is running. Close it and try again. |
| Windows: a project will not delete | A file in it is open elsewhere. Close any Explorer window or terminal sitting in that folder. |
Contributing
Contributions are welcome. Run from a clone:
git clone https://github.com/abdussamiakanda/gitlatex.git
cd gitlatex
pip install -e .
gitlatex
There is no build step. The browser loads the ES modules directly, so editing a file and reloading the page is the entire feedback loop.
Project layout
The code is split by area, so a change usually touches one small file.
Server (gitlatex/) — two layers: services/ holds the logic and knows
nothing about HTTP, routes/ holds thin blueprints that parse a request, call a
service and return JSON. That is why services/spell.py and routes/spell.py
both exist: the first is the spell checker, the second is the four endpoints in
front of it.
| Path | What lives there |
|---|---|
server.py |
CLI entry point — argument parsing only |
app.py |
Flask app factory: CORS, request logging, blueprint registration |
state.py |
The three process-wide values: repos dir, selected project, last compile error |
http.py |
Request helpers and MIME/extension tables |
services/spell.py |
LaTeX-aware spell checking on top of symspellpy |
services/latex.py |
Running the engine + bibtex/biber, and parsing the log |
services/synctex.py, services/synctex_reader.py |
PDF ↔ source lookups; the reader is a Python port of the synctex tool's logic, so no TeX install is needed |
services/snippets.py |
User snippets, stored in ~/.gitlatex/snippets.json |
services/projectindex.py |
Parsing \label{} and BibTeX entries for autocomplete |
services/paths.py |
Path safety and project tree walking |
services/updates.py |
The cached PyPI version check |
services/comments.py |
Review comment threads, stored in .gitlatex/comments/ |
services/gitrepo.py, services/git_backend.py |
Shared GitPython plumbing |
routes/ |
One blueprint per area — see routes/__init__.py |
To add an endpoint: put the logic in services/, then a short handler in the
matching routes/*.py. routes/pages.py registers last, because its catch-all
serves index.html for unknown paths.
Front end (gitlatex/public/)
| Path | What lives there |
|---|---|
app.js |
Entry point — event wiring only, no logic |
js/core/ |
api, state, storage, router, filetypes |
js/home/ |
repolist — the project list on the start page |
js/ui/ |
theme, modals, settings, consolepane, layout, viewer, pdfviewer, loading |
js/editor/ |
monaco, languages, completions, filetree, session, outline, spell, mainfile, envcolors, projectindex, review, snippets, synctex, vim, vimtex |
js/build/ |
compile, problems |
js/git/ |
actions, menu, versions, diffview |
css/ |
One stylesheet per area — the <link> order in index.html is the cascade order |
Three conventions worth knowing:
- Shared state lives on the single
stateobject injs/core/state.js. Anything only one module cares about stays local to that module. - Buttons opt in with
data-action="name"in the markup plus an entry in theACTIONSmap inapp.js. One delegated listener dispatches them all, so a new button needs noidand no new listener. - Loading states come from
js/ui/loading.js—showSkeletonfor lists,setPaneLoadingfor panes,setButtonLoadingfor actions. Use these rather than inventing a fourth pattern.
Releasing
The version comes from the latest v* git tag (via setuptools-scm), so there
is no version number to edit in the code. To publish to PyPI, go to Actions →
Publish to PyPI → Run workflow and pick patch, minor or major. The
workflow tags the next version, builds it and uploads it. Pushing a tag by hand
(git tag v2.0.0 && git push origin v2.0.0) works too. Ordinary pushes never
publish.
Credits
Built and maintained by Md Abdus Sami Akanda and Md Atiqur Rahman.
If GitLaTeX saves you some time, you can keep the coffee flowing.
License
Released under the ISC License.
Metadata
Release files for gitlatex 1.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gitlatex-1.9.0.tar.gz | 160.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gitlatex-1.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 347.0 kB
Release files / gitlatex-1.9.0.tar.gz
| Download URL | gitlatex-1.9.0.tar.gz |
|---|---|
| Size | 160.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed62cf10057cfe534e36a789df873ce022a1c423b9d14717d89b46e8263a8665
|
|
BLAKE2b-256 checksum How to use checksums |
5017a4b7fee3a681ae3b840182f24dc91dbc0226e5a996a525d5aa54e7ec8862
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency logRelease files / gitlatex-1.9.0-py3-none-any.whl
| Download URL | gitlatex-1.9.0-py3-none-any.whl |
|---|---|
| Size | 186.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2b0f188a542479aee0071fce34fd48ed51f4c9d837425ecf33a2b8e2213ed06f
|
|
BLAKE2b-256 checksum How to use checksums |
64771edc3550409b05b4f8c230f2e3dce60c95348991b6584c6d84d90532dfe1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency log