Quick Start Guide
You have a paper draft and a deadline. Let's get TeXRA working for you in under five minutes.
The Launcher tab: point it at your file, pick an agent and a model, write one sentence, and press Execute.
Overview
TeXRA sits inside VS Code and helps you polish writing, fix errors, create figures, and transform documents—without leaving your editor. Here's the short version:
- Select your file
- Pick an agent and model
- Write a short instruction
- Click Execute
- Review the diff
💡 Tip: Inside VS Code you can open the Run your first TeXRA workflow walkthrough from the Get Started page (or by running
TeXRA: Open Getting Started Walkthrough). It mirrors this guide step-by-step and links directly to the relevant commands.
Prefer the terminal?
This guide walks through the VS Code extension. If you installed the CLI, the same agents run from the command line — start an interactive session with texra chat, or run a single agent with texra run polish --input draft.tex. Run texra agents list to see what's available.
Set Up API Keys
Before you can use TeXRA's AI features, you need to provide API keys for the services you intend to use (like Anthropic, OpenAI, Google, etc.). TeXRA stores these keys securely using VS Code's secret storage.
- Open the Settings Dashboard: Click the gear icon at the top of the TeXRA panel, or run TeXRA: Show Settings Dashboard from the Command Palette.
- Go to the Models tab: The API Configuration table lists every provider with its current key status (
Set,Env, orNot set). - Set the key: Find your provider's row and click the Set API key button, then paste your key. Don't have one yet? Click the Get button to open the provider's API key page.
The Status column shows Set once the key is stored. To replace a key, set it again; to remove one, click the trash icon. Repeat for each provider you plan to use.
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 Models tab's API Configuration table: each provider shows its key status and Set / Get / Remove actions.
Per-provider settings
Expand a provider's row (click the chevron) to toggle streaming or, for providers that support it, point requests at a custom endpoint.
You can also place a .env file in your workspace with variables like OPENAI_API_KEY. TeXRA loads this automatically so you don't need to enter keys every time.
Basic Workflow
The typical TeXRA workflow consists of these steps:
- Select files to process (input, reference, auxiliary, figures)
- Choose the appropriate agent (correct, polish, research, etc.)
- Select the AI model to use
- Provide specific instructions
- Execute the agent
- Review the generated output
Your First TeXRA Task
Let's go through an example to illustrate the basic workflow.
Step 1: Open a Document
- Open VS Code
- Navigate to the TeXRA panel in the sidebar (click the brain icon) or press
Ctrl+Alt+M(Cmd+Option+Mon macOS) - Open or create a LaTeX document from the workspace you'd like to improve
Example
Run TeXRA: Create Sample Project from the Command Palette to add a ready-made example to your workspace. This creates a draft.tex file under texra-sample/. Open it, add your credentials in the Settings Dashboard's Models tab (see Set Up API Keys above), then select an agent and model in the TeXRA panel. Finally, write your instruction and execute the agent to see results.
Step 2: Select Files
- In the Input section, click Add files and pick your document from the file picker. You can also drag-and-drop it from the OS file manager. If you have several
.texfiles open and want them all, use Add opened files — it appends every editor tab whose extension matches. - (Optional) Use the same buttons in Context or Media to add reference, auxiliary, or figure files.
Onboarding Prompt
The first time you choose an input file, TeXRA shows a tooltip explaining the selector. Select Never remind again to hide it permanently.
Multiple Files
Each category holds an ordered list — add as many files as the task needs and drag rows to reorder them.
The file selector: Input holds the document you're editing, Context holds references and preamble, and Media holds figures.
Step 3: Choose Agent and Model
- In the dropdown menus at the bottom of the instruction box, select:
- Agent:
polish(for improving writing) - Model:
sonnet46(Claude Sonnet 4.6) or another available model
- Agent:
Onboarding Prompt
When you first open the agent or model dropdown, a tooltip explains its role. You can dismiss these prompts with Never remind again.
Step 4: Write Instructions
In the instruction text area, provide specific guidance for the AI. For example:
Improve the clarity and flow of this document. Focus on making the technical
explanations more accessible. Fix any grammatical issues or awkward phrasing.
Ensure consistent terminology throughout.Effective Instructions
Be specific about what you want! Vague instructions are like asking a genie for "something cool" – results may vary wildly. Include what should change and what should remain the same.
Step 5: Configure Tools
Two icon buttons sit in the file-group header rows of the file selector — one next to the Input label, one next to the Media label. They light up when a helper is active.
- Click the Tool configuration options button to:
- Attach TeX Count — include document word-count statistics so the agent knows the document's size and structure
- Click the Auto-extract options button to enable, for this run:
- Figures — pull figures out of the document automatically
- TikZ Figures — extract TikZ figures
- Compile Input PDF — compile the input to PDF first
Reflection rounds are controlled by the selected agent—most writing agents already include a follow-up critique pass.
The two helper menus in the Input and Media file-group headers. Active helpers tint their buttons; here Attach TeX Count and Figures are on.
Save Prompts for Later
For advanced debugging, enable the texra.debug.saveInputPrompt setting (in .texra/config.json or VS Code settings) to store the generated prompt alongside other debug artifacts.
Step 6: Execute the Agent
- Click the "Execute" button ()
- The ProgressBoard opens in the TeXRA view and streams the run live. See the ProgressBoard guide for more details on interpreting the logs.
- Wait for the process to complete - this may take a few moments depending on the document size and model choice
The ProgressBoard streams the run live — todos, delegated subagents, and the tool-use log — with the output files alongside.
Step 7: Review Results
- When the agent completes, VS Code will open the generated output file from the run's task storage folder (e.g.,
r0/draft.tex, preserving the input filename). - Review the changes made by the AI. Remember, it's smart, but hasn't passed its quals yet!
- You can compare the original and modified versions using:
ProgressBoard Diff: Click the Diff button on the completed stream to compare the original file against the generated task-storage output.
r0/draft.tex TeXRA12\begin{abstract}13We present an efficient method for the14estimation of spectral gaps in random regular graphs.15\end{abstract}1617\section{Preliminaries}18Let $G$ be a $d$-regular graph.draft.tex Previous draft12\begin{abstract}13We present anovel and efficientmethod for the14estimation of spectral gapsin random regular graphs.15\end{abstract}1617\section{Preliminaries}18Let $G$ be a graph.VS Code's diff editor opens with your original on the left and the round-0 output (
r0/draft.tex) on the right — removed text in red, improved text in green.You can accept reviewed outputs from the ProgressBoard after comparing the changes.
TeXRA's LaTeXdiff feature: Use the LaTeXdiffs section in the TeXRA panel for a compiled, visual comparison. This creates a PDF with additions highlighted in blue and deletions in red.
For details on how LaTeX diff works, see the LaTeX Diff guide.
From the CLI
The same agents are one command away from the terminal. After npm install -g @texra-ai/cli (Node.js >=22.9.0):
# Sign in for included hosted access, or set ANTHROPIC_API_KEY / OPENAI_API_KEY in your shell:
texra login
# One-shot run (writes output next to the input):
texra run polish --input draft.tex \
--instruction "Improve clarity; preserve math and citations."
# Or open an interactive tool-use session:
texra chatRun history is shared with VS Code, so a run started in the CLI shows up in the extension's ProgressBoard (and vice versa). See TeXRA CLI for sign-in, workspace defaults, and headless output formats.
Common Quick Tasks
Here are some common tasks you can try with TeXRA. Each is just an agent, a model, and a one-line instruction in the Launcher footer:
Three starter recipes — pick the agent and model, then paste the instruction. The first model listed is a good default; the others are interchangeable alternatives.
Understanding the Output
A completed run writes everything into the run's task storage folder, one folder per round. Each round holds three artifacts, and the document keeps your input filename (draft.tex, not output.tex):
r0/Round 0draft.texOutputinput filename preserveddraft.logLogprocess detailsdraft_polish_r0_diff.pdfDifforiginal vs revised
r1/next round, same trioOne folder per round under r{round}/<input-filename>: the revised Output, a Log of the run, and the Diff PDF. Round 1 (and any further reflection rounds) repeat the same trio.
So if your input file is paper.tex, the first round's output lands at r0/paper.tex — the filename you started with, never output.tex.
Next Steps
Now that you've completed your first task with TeXRA, you can:
- Explore more built-in agents for specialized tasks
- Learn about LaTeX diff for comparing document versions
- Discover how to use intelligent merge for combining changes
- Optimize your workflow with custom configuration
For any issues or questions, refer to the troubleshooting section or check the GitHub repository.