Skip to content

Quick Start Guide

You have a paper draft and a deadline. Let's get TeXRA working for you in under five minutes.

draft.tex — texra-sample
% sample project
\begin{abstract}
We present a novel and efficient method for the
estimation of spectral gaps in random regular
graphs, that is both fast and accurate.
\end{abstract}
\section{Preliminaries}
Let $G$ be a $d$-regular graph on $n$ vertices.

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:

  1. Select your file
  2. Pick an agent and model
  3. Write a short instruction
  4. Click Execute
  5. 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.

  1. 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.
  2. Go to the Models tab: The API Configuration table lists every provider with its current key status (Set, Env, or Not set).
  3. 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.

Dashboard — texra-paper

API Configuration

Chat subscriptions (ChatGPT Plus, Claude Pro, etc.) do not include API access — you need a key from the provider's developer platform.

Global default for all providers
ProviderStatusActions
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:

  1. Select files to process (input, reference, auxiliary, figures)
  2. Choose the appropriate agent (correct, polish, research, etc.)
  3. Select the AI model to use
  4. Provide specific instructions
  5. Execute the agent
  6. Review the generated output

Your First TeXRA Task

Let's go through an example to illustrate the basic workflow.

Step 1: Open a Document

  1. Open VS Code
  2. Navigate to the TeXRA panel in the sidebar (click the brain icon) or press Ctrl+Alt+M (Cmd+Option+M on macOS)
  3. 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

  1. 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 .tex files open and want them all, use Add opened files — it appends every editor tab whose extension matches.
  2. (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.

draft.tex — texra-paper
\documentclass{article}
\usepackage{preamble} % from Context
\begin{document}
\input{sections/intro}
\includegraphics{figure1.pdf} % from Media
\bibliography{references} % from Context
\end{document}

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

  1. 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

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.

  1. 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
  2. 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.

draft.tex — texra-sample
% sample project
\begin{abstract}
We present an efficient method for the estimation
of spectral gaps in random regular graphs.
\end{abstract}
\section{Preliminaries}
Let $G$ be a $d$-regular graph.

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

  1. Click the "Execute" button ()
  2. The ProgressBoard opens in the TeXRA view and streams the run live. See the ProgressBoard guide for more details on interpreting the logs.
  3. Wait for the process to complete - this may take a few moments depending on the document size and model choice
entanglement-paper — texra
% 3 references found · DOIs verified via Crossref
@article{wolff2021steady,
title = {Steady-state entanglement in driven spin chains},
author = {Wolff, S. and Kollath, C.},
journal = {Phys. Rev. A}, year = {2021},
doi = {10.1103/PhysRevA.103.022210}
}
Every entry resolves to a real DOI — no fabricated citations. ✓ 3/3 verified

The ProgressBoard streams the run live — todos, delegated subagents, and the tool-use log — with the output files alongside.

Step 7: Review Results

  1. 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).
  2. Review the changes made by the AI. Remember, it's smart, but hasn't passed its quals yet!
  3. 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.

      draft.tex ↔ r0/draft.tex (Working Tree) — texra-sample
      r0/draft.tex TeXRA
      12\begin{abstract}
      13We present an efficient method for the
      14estimation of spectral gaps in random regular graphs.
      15\end{abstract}
      16
      17\section{Preliminaries}
      18Let $G$ be a $d$-regular graph.
      draft.tex Previous draft
      12\begin{abstract}
      13We present a novel and efficient method for the
      14estimation of spectral gaps in random regular graphs.
      15\end{abstract}
      16
      17\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.

Open full example
Red strikethrough: Removed content
Blue underlined: Added/improved content

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):

bash
# 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 chat

Run 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:

Fix grammar & typos
correct
qwenturboor deepseek, gemini31p, sonnet46
Fix grammatical errors and typos without changing the content or technical terminology.
Paper to slides
paper2slide
sonnet46Tor opus48T, gpt55
Convert this paper into presentation slides using the beamer template. Create approximately 12–15 slides highlighting the key points, methodology, and results.
Polish writing style
polish
opus46or sonnet46T
Improve the writing style to make it more engaging and clear. Enhance the flow between paragraphs while preserving all technical content.

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):

task storager{round}/<input-filename>
r0/Round 0
  • draft.texOutputinput filename preserved
  • draft.logLogprocess details
  • draft_polish_r0_diff.pdfDifforiginal vs revised
r1/next round, same trio

One 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:

For any issues or questions, refer to the troubleshooting section or check the GitHub repository.