Installation guide
This guide covers installing TeXRA as a VS Code extension or standalone CLI, along with the optional system dependencies for compiling, diffing, and rendering LaTeX documents. Running agents requires only an API key or connected model provider; local LaTeX tools are used for building previews, generating visual diffs, and formatting equations.
System requirements
TeXRA runs on all major operating systems. Minimum requirements:
- Visual Studio Code: Version 1.125 or newer (for the VS Code extension)
- Operating System: Windows, macOS, or Linux
- Internet Connection: Required for API access to language models
Installing the extension
From extension marketplaces
The shortest path is an extension marketplace:
- Open VS Code or your VSCodium-compatible editor.
- Open the Extensions view (select the square icon in the Activity Bar or press
Ctrl+Shift+X). - Search for "TeXRA".
- Find the extension published by "texra-ai".
- Select Install.
- Reload your editor if prompted.
TeXRA is available on both the official VS Code Marketplace and the Open VSX Registry:
Open in VS CodeView on Open VSX
You can also install TeXRA in your preferred editor through a protocol link:
CLI
The standalone texra command is published to npm. Install it globally (requires Node.js 22.19.0 or later in 22.x, or Node.js 24 or later):
npm install -g @texra-ai/cliOr with Homebrew on macOS and Linux:
brew install texra-ai/tap/texraRead the TeXRA CLI guide for usage, shell completion, and workspace defaults.
From VSIX file
- Open VS Code
- Download the newest release (
.vsixfile, e.g.,texra-<version>.vsix) - Find the
.vsixfile in the VS Code file explorer - Right-click the
.vsixfile - From the context menu, select "Install Extension VSIX"
Installing required dependencies
TeXRA needs a few external tools. Only a LaTeX distribution is required for core document processing; the other tools below unlock specific features. Install the ones you need and follow the instructions for your operating system.
Core document processing: compiles and rendering .tex.
Backs the latexindent and latexdiff scripts.
Figure and image processing.
Rasterizes PDF figures for the image tools above.
Install only what you need: a LaTeX distribution is the one hard requirement; Perl, GraphicsMagick/ImageMagick, and Ghostscript each unlock a specific optional feature.
Check what's detected with texra doctor
Run texra doctor to see what TeXRA found: Node.js, the workspace and packaged resources, your TeXRA account and available models, usage logging, the LaTeX toolchain (latexmk, pdflatex, xelatex, lualatex, bibtex, biber, latexdiff, latexindent), and the workspace config file. The optional image tools (GraphicsMagick/ImageMagick, Ghostscript) are not part of the doctor report; a feature that needs them tells you when they are missing.
- latexmkfound
- pdflatexfound
- xelatexfound
- lualatexfound
- bibtexfound
- biberfound
- latexdifffound
- latexindentfound
- Node.js22.11.0found
- Authenticationsigned infound
- Models availableAnthropic, OpenAIfound
- GraphicsMagick / ImageMagickchecked when needed
- Ghostscriptchecked when needed
- Wolframchecked when needed
texra doctor checks the runtime, your account and models, usage logging, the full LaTeX toolchain, and the workspace config. Optional image tools are not listed; the feature that needs them reports when one is missing.
Homebrew
WHAT IS HOMEBREW?
Homebrew is a free package manager for macOS and Linux that installs command-line tools and applications from the terminal. Many of the macOS instructions below use brew install commands, which require Homebrew.
If you're on macOS and don't have Homebrew yet, open the Terminal app (in Applications, under Utilities) and paste this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the on-screen prompts to complete the installation. Then you can use any of the brew install commands in the sections below.
TIP
If you prefer not to use Homebrew, each section also links to the tool's official website, where you can download a traditional installer.
LaTeX distribution
IMPORTANT
TeXRA needs a LaTeX distribution to process LaTeX documents.
Windows
Install either MiKTeX or TeX Live (MiKTeX is easier for beginners):
MiKTeX (recommended for Windows):
- Go to miktex.org/download
- Download the Windows installer
- Run the downloaded
.exefile and follow the setup wizard - When prompted, choose "Install missing packages on the fly" so MiKTeX downloads LaTeX packages as you need them
TeX Live (alternative):
- Go to tug.org/texlive/windows.html
- Download the
install-tl-windows.exeinstaller - Run the installer. The full installation may take a while because TeX Live downloads all packages up front
After installing either distribution, restart VS Code so TeXRA can detect the new programs. To verify the installation, open a terminal (Command Prompt or PowerShell) and run:
pdflatex --versionmacOS
Install TeX Live through Homebrew. This is the recommended option for most TeXRA users: it is smaller, stays current with brew upgrade, and skips the Mac-specific GUI apps that VS Code users don't need:
brew install texliveAlternative distributions:
- MacTeX with GUI apps (includes TeXShop, BibDesk, etc., ~4 GB):
brew install --cask mactex, or download the.pkgfrom tug.org/mactex - MacTeX without GUI apps (smaller MacTeX variant):
brew install --cask mactex-no-gui
After installing, restart VS Code so TeXRA can detect the new programs. To verify, open Terminal and run:
pdflatex --versionLinux (Ubuntu/Debian)
Install TeX Live:
sudo apt-get update
sudo apt-get install texlive-fullAfter installing, restart VS Code and verify with:
pdflatex --versionPerl
OPTIONAL
Perl backs the latexindent and latexdiff LaTeX tools (both are Perl scripts). You only need it if you use auto-formatting or LaTeX diffs. It ships with macOS and with TeX Live, and is present on most Linux installs, but not with MiKTeX, and not on minimal or container Linux images. Check with perl --version rather than assuming.
Windows
TeX Live for Windows ships its own Perl, so latexindent and latexdiff work without further setup. MiKTeX does not bundle Perl. If you installed MiKTeX (the option recommended above for beginners), install Perl separately:
- Download Strawberry Perl
- Run the installer, which adds Perl to your PATH
- Restart VS Code, then verify in Command Prompt or PowerShell:
perl --versionIf you skip this on MiKTeX, TeXRA still compiles documents; only auto-formatting and LaTeX diffs are unavailable. The setup assistant flags the missing dependency and points to the same download.
macOS
- Pre-installed
- Verify with
perl --versionin Terminal
Linux
sudo apt-get install perlGraphicsMagick/ImageMagick
OPTIONAL
Needed only for TeXRA's figure and image processing features. GraphicsMagick is the recommended option for better performance; ImageMagick is a drop-in alternative.
GraphicsMagick
Windows:
- Download from the GraphicsMagick website
- Add the installation directory to PATH
macOS:
brew install graphicsmagickLinux:
sudo apt-get install graphicsmagickImageMagick (alternative)
Windows:
- Download from the ImageMagick website
- Follow the detailed installation guide
macOS:
brew install imagemagickLinux:
sudo apt-get install imagemagickGhostscript
OPTIONAL
GraphicsMagick/ImageMagick use Ghostscript to rasterize PDF figures. Install it alongside GraphicsMagick/ImageMagick only if you use TeXRA's figure/image processing features.
Windows
- Download from the Ghostscript website
- If you run into compatibility issues, install version 9.52 from the Ghostscript 9.52 release page
macOS
brew install ghostscriptLinux
sudo apt-get install ghostscriptSetting up API keys
TeXRA talks to model providers directly with an API key you supply. You need a key from at least one provider (Anthropic, OpenAI, Google, etc.), and you give it to TeXRA the same way on every platform: the key is named ANTHROPIC_API_KEY / OPENAI_API_KEY / GOOGLE_API_KEY and so on.
In the VS Code extension
The shortest path: open the TeXRA Dashboard, go to the Providers & Models tab, and select the provider you want. Paste the key and it is saved in VS Code's secret storage. You can also run TeXRA: Set API Key from the Command Palette, or put the keys in a .env file in your project; the extension reads it on startup.
API Configuration
Chat subscriptions (ChatGPT Plus, Claude Pro, etc.) do not include API access — you need a key from the provider's developer platform.
| Provider | Status | Actions |
|---|---|---|
Anthropic | Key set | |
OpenAI | Key set | |
Google | Env | |
xAI | Not set | |
DeepSeek | Not set |
The Dashboard's Providers & Models tab → API configuration: each provider shows its key status (Set · Env · Not set) with Set, Get, and Remove actions.
In the CLI
Set the provider key in your shell, then check that it is picked up:
export ANTHROPIC_API_KEY=sk-…
texra doctorThe CLI doesn't read .env files automatically (the extension does). If you already keep keys in a project .env, load them into the shell first, for example in bash or zsh:
set -a; . .env; set +a
texra doctorIf you prefer not to manage keys, connect a provider subscription instead. A ChatGPT subscription unlocks the Codex models, and a Grok (xAI SuperGrok) subscription unlocks the xAI models. texra auth login separately signs in to your TeXRA account:
texra auth chatgpt login
texra auth grok login
texra auth statusRead the TeXRA CLI guide for provider keys, subscriptions, and workspace defaults.
Getting API Keys
- OpenAI API Key: Available from OpenAI API
- Anthropic API Key: Available from Anthropic Console
- Google API Key: Available from Google AI Studio
- OpenRouter API Key: Available from OpenRouter Dashboard
- xAI API Key: Available from xAI Console
- DeepSeek API Key: Available from DeepSeek Platform
- Moonshot API Key: Available from Moonshot Console; a Kimi Code plan key (
KIMI_CODE_API_KEY) is a separate slot alongside it - DashScope API Key: Available from DashScope Console
- MiniMax API Key: Available from MiniMax Platform (international) or MiniMax China (China region)
- GLM API Key: Available from Z.AI (international) or BigModel (China region)
- Meta API Key (Muse Spark): Available from dev.meta.ai
Verifying installation
To verify that TeXRA and its dependencies are installed correctly:
- Open VS Code
- Select the TeXRA icon in the Secondary Side Bar
- The TeXRA panel should load without errors
- Create or open a LaTeX document
- Try a simple command like
TeXRA: Indent Current TeXfrom the Command Palette (the editor title bar only shows TeXRA's Fix Compilation button for LaTeX files)
If a component is missing, TeXRA shows an error message that names what needs to be installed.
Troubleshooting installation
Common installation issues
Most installation problems fall into one of four categories. Find your symptom and work through its checks:
Four common failure modes and the checks for each: a loading extension, LaTeX or image processing, and API keys.
Getting help
If an installation problem persists:
- Check the GitHub Issues page for known problems
- Look for error messages in the TeXRA ProgressBoard
- File a new issue with details about your system and the specific error
Next steps
With TeXRA and its dependencies installed, you're ready to start. Read the Quick start guide to learn the basics, or explore specific features in the other documentation sections.