
mylatex
io.github.falahi1/mylatex
Edit and compile LaTeX projects open in the MyLaTeX editor.
Documentation
MyLaTeX is a LaTeX editor that runs on your own computer. You open a folder, write your thesis or report, and see the PDF next to your text. AI agents such as Claude Code, Gemini CLI and Codex can connect to the same folder. They read your document, suggest changes, build it and read the errors. Every change they make is marked in the editor, and you choose to keep it or undo it. MyLaTeX itself never sends your files anywhere. An agent you connect sends what it reads to its own service, as it does in any other use.

Install
You need Windows, MiKTeX and Python 3.13 or newer.
-
Install MiKTeX. During setup, or later in the MiKTeX Console under Settings, set "Install missing packages on-the-fly" to Never. Do not set it to Always. This stops a build from installing software without you knowing. "Ask me first" also stops silent installs, but MyLaTeX shows a warning on each build.
-
Install MyLaTeX with pipx:
pipx install mylatex
MyLaTeX does not change MiKTeX or its settings.
First run
Open a terminal, go to the folder that holds your LaTeX files, and run mylatex:
cd path\to\your\thesis
mylatex
MyLaTeX opens in its own app window, with that folder as the project. Edit your .tex files, press Compile, and the PDF appears on the right. Problems from the build are listed in plain words and link back to the line.
Unsaved text is kept as a draft if the window or the program closes unexpectedly.
Connect your agent
An agent connects with mylatex mcp, an MCP server that uses your project's folder. Run mylatex once in the folder first, so MyLaTeX knows it is a project. Then start your agent in that same folder.
Claude Code
/plugin marketplace add falahi1/mylatex
/plugin install mylatex@mylatex-marketplace
Gemini CLI
gemini extensions install https://github.com/falahi1/mylatex
Codex
codex mcp add mylatex -- mylatex mcp
Other MCP apps
Add a server that runs the command mylatex with the argument mcp, started in your project folder.
See docs/agents.md for more detail, including a Codex config file, an AGENTS.md snippet and local models.
What agents can and can't do
An agent can:
- read your files, including text you have typed but not yet saved
- search the project for text
- propose an edit, always with a reason
- create a new file
- build the document and read the problems and the build log
- see the list of its own changes that are still waiting for you
An agent can't:
- delete or rename files or projects
- change your settings or MiKTeX, or install packages
- open other folders on your computer
- see the PDF itself
- run a build with shell-escape, even if you allowed it for your own builds
Edits replace an exact piece of text. If the agent's text no longer matches, the edit is refused and nothing is guessed. Each change appears in the editor with a bar showing who made it and why, with Keep and Undo. The Changes tab lists them all, with Keep all and Undo all. Undo puts back exactly the text that was there before, or, if you have changed that text since, says so and leaves it alone.
Where your PDFs go
Builds go to a hidden folder that MyLaTeX manages in your app data. The preview reads from there. Your project folder stays clean, with no build files in it.
To get a PDF you can send or print, press Save PDF. You can choose to be asked each time, or to always save into one folder. The saved copy changes only when you press Save PDF again.
Troubleshooting
- "mylatex" is not found after install. Run
pipx ensurepath, then open a new terminal. pipx install mylatexfails with a Python-version error. Runpipx install --python 3.13 mylatex. Python 3.13 or newer must be installed.- The build says it cannot find a tool. Check that MiKTeX is installed and that its programs are on your PATH. Open a new terminal after installing.
- Perl is missing (or a build fails with "could not find the script engine 'perl'"). Latexmk needs Perl. Install a Perl for Windows, such as Strawberry Perl, then try again.
- A package is missing. With installs set to Never, MiKTeX does not fetch it. Install it yourself in the MiKTeX Console, then build again.
- The agent says "This folder isn't a MyLaTeX project. Run
mylatexin it first." Runmylatexin that folder once, then restart the agent in it. - Save PDF says the file is open in another program. Close it in your PDF reader and save again.
- Your project is in OneDrive. This works. Files marked "Free up space" are not downloaded just by being watched.
How this was built
MyLaTeX was designed and directed by Fazley Alahi (falahi1). It was built with Claude Code, working from written designs and implementation plans, with each step reviewed. The designs, plans and review notes are kept in docs/superpowers/ as the record.
Licence
MIT. See LICENSE. The licences of the packages MyLaTeX uses are in docs/LICENCES.md.
mylatexpip install mylatex