AI-native LaTeX editor
SomeScript#
A chat agent that works inside your LaTeX project to read, edit, fix, and recompile files, showing every change as a diff you can undo. Runs in the browser with realtime collaboration or locally as a free desktop app with bring-your-own-model AI.
- Next.js 16
- React 19
- Tauri 2
- Rust (axum)
- CodeMirror 6
- Tectonic
- SyncTeX
- Hocuspocus
- PostgreSQL
- Redis

Overview#
SomeScript is a LaTeX editor built around an embedded AI assistant that operates directly on the open project. Researchers, students, and technical authors use it to write papers, resolve compilation errors, and preview typeset PDFs without maintaining a local TeX Live installation.
It ships in two forms from one shared editor codebase: SomeScript Cloud for browser-based workspaces with multi-user collaboration, and SomeScript Desktop for offline local editing where projects stay as plain folders on disk with no account or subscription.
Features#
| Capability | Details |
|---|---|
| Embedded AI agent | Reads, searches, edits, creates, deletes, and compiles project files. Cloud runs the Eve agent (Lite, Pro, Expert modes) with Crossref citation lookup and web search; Desktop runs a local Rust agent loop with your own API key. |
| Reviewable diffs and undo | File edits render with Shiki-highlighted diffs (structuredPatch), Human-in-the-Loop approval cards for writes, staleness checks against concurrent edits, and one-click undo. |
| CodeMirror 6 editor | LaTeX syntax highlighting via codemirror-lang-latex, CST-based collapsible section outline, project-wide literal and regex search/replace, and image/PDF binary viewers. |
| Tectonic and SyncTeX | Automatic compilation with Tectonic and bidirectional SyncTeX navigation (synctex view / synctex edit) between source lines and the embedded @embedpdf/react-pdf-viewer preview. |
| Terminal error cards | Structured compiler log viewer that parses Tectonic errors by file and line number with a Send to chat action for AI-assisted repair. |
| Realtime collaboration | Cloud workspaces sync via Y.js CRDTs over Hocuspocus v4 with live multi-cursor presence, awareness state, and differential file persistence. |
| Project kanban board | Built-in three-column task board (todo, ongoing, finished) stored in .somescript/tasks.json, supporting drag-and-drop and links to source lines or PDF pages. |
Inside the editor#
The editor is one window with a left tool rail, a source pane, a live PDF and a terminal. These captures come from the installed desktop app (version 0.1.5) working on a small demo project, because the hosted editor sits behind sign-in.

| Area | What it does |
|---|---|
| Top bar | Back to the dashboard, project and file breadcrumb, Compile, Download PDF and layout toggles for the side panel, terminal and PDF. |
| Left rail | Tabs for the file tree, the Agent, project search, Tasks and settings. |
| Source pane | CodeMirror with a formatting toolbar (undo, bold, italic, headings, math, symbols, lists, snippets), folding and a ⌘K search. |
| PDF pane | The compiled document with zoom, select and pan tools, and a page navigator. |
| Terminal | Compile output as Raw text or readable Cards, with a Send to chat button that hands an error to the agent. |

Every step is a card: files listed, a file read with its line range, a plan whose steps tick off as the agent works, each edit as a diff you can undo, and the compile result. The model picker sits under the message box, and files can be attached to a message.

Tasks are a board for the open project that you fill in by hand. Each card has a drag handle and a checkbox; ticking it moves the card to Finished.
Screenshots#




How it's built#
SomeScript is a Bun-managed Turborepo monorepo split into six applications under apps/ so compilation, realtime sync, web auth, and desktop packaging stay isolated.
| App | Stack | Role and host |
|---|---|---|
apps/web | Next.js 16, Clerk, Drizzle ORM, Stripe | Marketing site, authenticated workspace dashboard, and billing on Vercel. |
apps/editor | Next.js 16, CodeMirror 6, @embedpdf, @assistant-ui/react | Core LaTeX IDE, file tree (react-arborist), Eve AI agent, and project APIs on Railway. |
apps/compiler | Bun, Tectonic, SyncTeX CLI, Redis | Isolated HTTP compilation service (/compile, /synctex, /health) with SHA-256 output caching on Railway. |
apps/collaboration | Bun, Hocuspocus v4, Y.js, Redis | WebSocket CRDT sync (project:<id> rooms), Clerk JWT verification, and debounced S3 persistence on Railway. |
apps/tauri | Tauri 2, Rust (axum), Vite, React 19 | Native desktop app that aliases @/ to apps/editor without forking the UI and re-implements /api/* in Rust. |
apps/docs | Nuxt, Docus, KaTeX | LaTeX writing and platform documentation portal deployed statically on Vercel. |
On the cloud platform, PostgreSQL stores workspaces and project ownership, S3-compatible object storage (Tigris on Railway, RustFS in local Docker Compose) holds project files and .somescript/collab-state.bin, and Redis handles token-bucket rate limiting, differential compile file hashes, compile output caching, and Hocuspocus replica sync.
Install#
Use the hosted cloud editor at somescript.com (free tier includes 10 projects, unlimited compiles, realtime collaboration, and 300 monthly Lite AI credits), or install SomeScript Desktop from the download section on the same site, which lists installers for macOS, Windows and Linux.

Desktop and offline mode#
The desktop binary embeds the built editor SPA and serves it from a local Rust axum server bound strictly to 127.0.0.1. Every launch generates a random token exchanged for an HttpOnly; SameSite=Strict cookie, validates the Host header against DNS rebinding, and confines all file operations (including symlinks) to the active project folder.
- Offline compilation: Tectonic and SyncTeX ship as bundled sidecars. Running Prepare for offline use pre-downloads common LaTeX packages so documents compile without network access.
- Bring-your-own-key AI: Connect OpenAI, Anthropic, OpenRouter, Gemini, Groq, DeepSeek, Ollama, LM Studio, vLLM, or any OpenAI-compatible endpoint in Settings. Keys stay in a local owner-only
ai.jsonfile and are never sent back to the UI. - Signed self-updates: The Tauri updater checks
latest.jsonon GitHub Releases and verifies binaries with minisign / Ed25519 before offering a one-click update.