Projects

fankritsSomeScript

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

At a glance

Platform
Web, macOS (Universal), Windows (x64), Linux (x64)
LaTeX engine
Tectonic and official SyncTeX CLI
Auth and billing
Clerk and Stripe on Cloud; none on Desktop
Storage
PostgreSQL (Drizzle ORM), Redis, S3 buckets; plain local folders on Desktop
Hosting
Vercel (web, docs) and Railway (editor, compiler, collaboration)
License
All rights reserved (private repository)
SomeScript Desktop editor: agent chat with a plan and compile result on the left, LaTeX source in the middle, the compiled PDF on the right and a terminal showing no compilation errors below
SomeScript Desktop editing a demo project: agent chat, source, PDF preview and compile terminal in one window.

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#

CapabilityDetails
Embedded AI agentReads, 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 undoFile 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 editorLaTeX 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 SyncTeXAutomatic compilation with Tectonic and bidirectional SyncTeX navigation (synctex view / synctex edit) between source lines and the embedded @embedpdf/react-pdf-viewer preview.
Terminal error cardsStructured compiler log viewer that parses Tectonic errors by file and line number with a Send to chat action for AI-assisted repair.
Realtime collaborationCloud workspaces sync via Y.js CRDTs over Hocuspocus v4 with live multi-cursor presence, awareness state, and differential file persistence.
Project kanban boardBuilt-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.

Full SomeScript Desktop editor window with agent chat, LaTeX source, PDF preview and terminal
The full window after an agent run: plan finished, edit applied, project recompiled with no errors.
AreaWhat it does
Top barBack to the dashboard, project and file breadcrumb, Compile, Download PDF and layout toggles for the side panel, terminal and PDF.
Left railTabs for the file tree, the Agent, project search, Tasks and settings.
Source paneCodeMirror with a formatting toolbar (undo, bold, italic, headings, math, symbols, lists, snippets), folding and a ⌘K search.
PDF paneThe compiled document with zoom, select and pan tools, and a page navigator.
TerminalCompile output as Raw text or readable Cards, with a Send to chat button that hands an error to the agent.
Agent panel showing tool calls, a three-step plan with one step done, and an edit to main.tex as a green diff with an Undo button
The agent lists and reads files, keeps a plan, then shows its edit to main.tex as a diff with an Undo button.

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 kanban in the left panel with two items in To do, none On going and one checked off under Finished, beside the LaTeX source
The Tasks tab: a board with To do, On going and Finished lanes and a 1/3 done counter.

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#

SomeScript landing page showing main.tex LaTeX source on the left and compiled Fundamental Theorem of Calculus PDF preview on the right
The public landing page with a live source and PDF preview.
Feature previews for Terminal and Error Repair, Real-Time Co-Authoring with multiple cursors, and Kanban Tasks
Interactive feature previews on the landing page: Tectonic terminal error repair, multi-cursor co-authoring, and project kanban tasks.
SomeScript Docs Mathematics guide in dark mode with navigation sidebar, rendered KaTeX equation, and Explain with AI trigger
Public LaTeX documentation site (docs.somescript.com) built with Nuxt and Docus, showing KaTeX math rendering and sidebar navigation.
SomeScript Cloud pricing page showing Free, Pro, and Team workspace-billed tiers
Cloud workspace pricing page (Free, Pro, and Team) with per-workspace billing and AI credit metering.

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.

AppStackRole and host
apps/webNext.js 16, Clerk, Drizzle ORM, StripeMarketing site, authenticated workspace dashboard, and billing on Vercel.
apps/editorNext.js 16, CodeMirror 6, @embedpdf, @assistant-ui/reactCore LaTeX IDE, file tree (react-arborist), Eve AI agent, and project APIs on Railway.
apps/compilerBun, Tectonic, SyncTeX CLI, RedisIsolated HTTP compilation service (/compile, /synctex, /health) with SHA-256 output caching on Railway.
apps/collaborationBun, Hocuspocus v4, Y.js, RedisWebSocket CRDT sync (project:<id> rooms), Clerk JWT verification, and debounced S3 persistence on Railway.
apps/tauriTauri 2, Rust (axum), Vite, React 19Native desktop app that aliases @/ to apps/editor without forking the UI and re-implements /api/* in Rust.
apps/docsNuxt, Docus, KaTeXLaTeX 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.

SomeScript Desktop download section showing macOS, Windows, and Linux installer tabs with Homebrew cask and shell install commands
Desktop download section on somescript.com with platform tabs and installer commands.

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.json file and are never sent back to the UI.
  • Signed self-updates: The Tauri updater checks latest.json on GitHub Releases and verifies binaries with minisign / Ed25519 before offering a one-click update.