Skip to content

Releases

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 20:57
0748ea6

Added

  • refract local runs Refract on your own computer with no configuration: data in the per-user data folder (REFRACT_DATA_DIR still overrides it), a secret key created on first run as an owner-only secret.key in that folder and reused after (REFRACT_SECRET_KEY takes precedence), no sign-in, listening on loopback only (127.0.0.1:8080 by default, or a free port when it is taken; --port, or REFRACT_ADDR on 127.0.0.1 or ::1, chooses another), and it opens the browser once the server answers (--no-browser to skip). Logs are readable lines on a terminal.
  • Citation checks scoped to the selected main document, its included sources and loaded bibliographies, for missing keys, duplicate or incomplete bibliography entries, unused entries and optional online DOI verification; source metadata corrections from doi.org/arXiv are shown as editor proposals, with Spanish translations.
  • A word count for the current source or PDF selection (toggle Word count in the account menu) and word limits for sections, so you can keep each one within its budget.
  • REFRACT_PROFILE=team for people who must not read each other's files: it requires sign-in, runs every compile in the compile sandbox and refuses to start, saying what is missing, when it can't isolate them. The default, REFRACT_PROFILE=personal, warns at startup when several accounts compile without isolation.
  • Document and hierarchical section word counts in the outline, following included files and the existing counter/title preferences.
  • PDF search with highlighted matches, previous/next navigation, keyboard controls and parallel page indexing. Reading and zooming preserve your position, recompiling keeps the selected match number, and search buttons work with the keyboard.
  • Return links beside cited PDF bibliography entries, with a choice of occurrences for references cited multiple times.
  • Built-in templates offer English and Spanish, defaulting to the interface language, and generate separate section files assembled by main.tex, with folder and section filenames in the selected language.
  • Project templates: styled article, thesis, widescreen Beamer presentation, letter and one-page CV starters with editable metadata, structured sample content and examples of tables and references; save private templates from your projects and reuse independent copies with their selected main file.
  • LaTeX completion in the editor: common commands and environments (\begin{…} closes itself), \ref and friends from the project's labels, \cite from its .bib files, and file paths in \input, \include and \includegraphics. Commands and environments show their arguments and a short description, the arguments stay in view while filling them in, and citations show the author, year and title of each work.
  • REFRACT_MODE=selfhost|saas says whether Refract runs as a self-hosted install (the default) or as the hosted service. The hosted service doesn't offer the ChatGPT plan: Settings → Assistant shows API providers only.
  • A document outline under the file tree: the sections of the main file and the files it \inputs or \includes, indented by level. Click a heading to jump to it; the one containing the cursor is highlighted, and it refreshes on save. Headings are also in the command palette (⌘K, Go to section…).
  • Project instructions: a REFRACT.md at the project root that the assistant and quick actions always follow (style, spelling, notation, what not to touch). Open or create it from the project menu; ask the assistant to remember something and it proposes an edit to it.
  • Before an upgrade changes the database, Refract keeps a copy of it as refract.db.pre-upgrade, and an older Refract refuses to open a database a newer version has upgraded.
  • Refract records the tokens each model call uses, per account and model (never the text), and shows this month's total in the account menu (per model on hover) and in Settings → Assistant → Token usage.
  • Deleting a project moves it to the trash for 30 days instead of removing it at once. Undo from the notification, or restore or delete forever from the new Trash page; projects older than 30 days in the trash are deleted for good.
  • A project open in the workspace when it goes to the trash (from another tab or device) becomes read-only with a banner and a Restore button: unsaved edits are kept and saved on restore, and if the project was deleted for good meanwhile, you can copy the unsaved text.
  • On the hosted service (REFRACT_MODE=saas), each account has a plan that limits its projects, storage (with history) and assistant turns. refract users plan sets it. Self-hosted installs have no limits.
  • Accounts can be created and managed by their owners. With REFRACT_AUTH=builtin, a mail server (REFRACT_SMTP_URL, REFRACT_MAIL_FROM) and REFRACT_PUBLIC_URL, REFRACT_SIGNUP=open adds a sign-up page; there is a confirmation email for new addresses, a "Forgot your password?" reset by email, and Settings → Account to confirm the address, choose the language of the emails, change the password and delete the account with everything in it, projects in the trash included. Links in emails work once, expire after 24 hours (confirming) or 1 hour (resetting) and are plain text, in English or Spanish.
  • REFRACT_AUTH=builtin is the new name of REFRACT_AUTH=password, which keeps working.
  • REFRACT_SANDBOX=bwrap runs every compile in a bubblewrap sandbox: no network, a read-only view of the system and of the project being built, and limits on CPU, memory, processes and file size. It needs the TeX bundle as a local folder: packaging/server/prepare-bundle.sh prepares it, and packaging/server/refract.service is a systemd unit for the hosted service. Refract checks it at startup by compiling a small document.
  • REFRACT_COMPILE_WORKERS and REFRACT_COMPILE_MAX_WAIT set how many compiles run at once and how long one waits for its turn.
  • Sticky scroll in the editor: the enclosing LaTeX sections and environments stay at the top while you scroll, drawn like their own lines and pushed out smoothly as the next one arrives. On by default; turn it off in Settings → Editor.
  • A Download PDF button in the preview's header.
  • Settings → Account lists the browsers signed in to the account (device, last activity, address) and signs out one of them or all the others. Sessions now also end after 7 days without use, besides 30 days after signing in, and over https the cookie is named __Host-refract_session; the upgrade itself signs nobody out (sessions keep their original 30-day end).

Changed

  • Refract listens on 127.0.0.1:8080 by default, so a server started without REFRACT_ADDR is reachable from this computer only. Set REFRACT_ADDR=:8080 to listen on every interface; the container image already does, so there -p decides the mapping on the Docker host, and containers on a shared Docker network can still connect.
  • Compile and its main file menu moved from the editor's tab row to the preview's header, beside the compile status.
  • Changing the password moved from Settings → General to the new Settings → Account.
  • Until an address is confirmed, an account that signed up can sign in but can't create or import projects. Existing accounts, and those added with refract users add, count as confirmed.
  • With REFRACT_MODE=saas and REFRACT_AUTH=builtin, REFRACT_SIGNUP=open is refused until the terms and privacy policy people accept at sign-up exist: keep the default (closed) and add accounts with refract users add.
  • Each account compiles one project at a time, in every mode: with REFRACT_AUTH=none everyone is the same account, so compiles of different projects now run one after another. When the server is busy, a compile waits up to REFRACT_COMPILE_MAX_WAIT and then answers "the server is busy, try again in a moment" (the assistant is told to try again).

Fixed

  • PDF contents, citations and cross-references now navigate to their destination in the preview; website and email links are clickable too.
  • Citations added from Refract go to the bibliography next to the main file when it is in a subfolder, so they reach the PDF (#13).
  • When no file loads a bibliography yet, the setup hint after citing (in the editor and from the assistant) names the .bib relative to the main file's folder, as \bibliography resolves it.
  • Citing ignores a commented-out \bibliography or \addbibresource, uses the first usable name of a list such as \bibliography{a,b}, and drops spaces from \bibliography names as LaTeX does ({my refs} is myrefs.bib).
  • When no file loads a bibliography yet and the main file is in a subfolder, citations go to a .bib in that folder if there is one, before any other .bib in the project.
  • Stopping the server waits for requests in flight (up to 10 s) and for auto-pushes in progress, and lets running assistant turns record that they were stopped, instead of closing the database under them. Give Docker time for it with docker run --stop-timeout 30.
  • Starting Refract for the first time while a refract users command runs no longer fails with "database is locked".
  • Compiling, accepting assistant changes, restoring history, pulling and auto-push no longer fail at random when they touch the same project at the same moment, and a turn can't be accepted and rejected at once.

Security

  • Downloading the PDF or the log no longer follows symbolic links: a project whose build folder, or an output in it, was a link (a pulled repository can contain one) could serve a file from outside the project. Downloads now open them like the compiler does: no part of .refract/build may be a link or junction, the output must be a regular file, and anything else answers "not built yet". On Unix each part is opened relative to the one before without following links. On Windows each part is opened rela...
Read more

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 27 Oct 15:20

Added

  • Install the CLI on macOS with brew install ponytojas/tap/refract.
  • Debian/Ubuntu CLI packages for amd64 and arm64, with no server service or LaTeX dependencies.
  • Homebrew formula and WinGet manifests generated from each release's archives and checksums.
  • CLI smoke tests on macOS, Linux and Windows before publishing release assets, plus packaging tests in CI.
  • Optional automatic Homebrew tap updates for stable releases.

v0.1.1

Choose a tag to compare

@github-actions github-actions released this 27 Oct 14:03

Fixed

  • The Docker image is published. The release check for 0.1.0 asked SyncTeX for a relative file name, failed, and stopped that version's image before it reached the registry. The application is the same as in 0.1.0.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 27 Oct 13:37

The first release: a self-hosted LaTeX workspace with an AI assistant.

Editor and PDF

  • LaTeX editor with tabs, autosave and syntax highlighting.
  • Compilation with Tectonic, which fetches the packages a document needs; errors and warnings listed with file and line, each with Fix with AI.
  • Named fontspec families (\setmainfont{Open Sans}) work without changing the document: Refract uses the project's own font files, the TeX bundle's Latin Modern and TeX Gyre, or downloads the family from Google Fonts (REFRACT_FONT_DOWNLOADS=0 turns downloads off). By Lorena Jimenez in #1.
  • PDF preview with SyncTeX in both directions (⌘J, and ⌘-click in the PDF), and a right-click menu in the PDF.
  • Command palette (⌘K) and a shortcut overlay.
  • English and Spanish interface, light and dark themes, installable as an app from the browser.
  • Smooth transitions between pages, without reloads.

Assistant

  • An agent that reads, searches, edits and compiles the project in a separate git worktree, and hands back its changes as a review: accept or reject all at once or file by file.
  • Shows the model's reasoning when the model provides it; each chat remembers its model and reasoning level.
  • Quick actions on a selection (improve, shorten, fix grammar, table, explain, free instruction) shown as inline word diffs.

References

  • Finds published papers (OpenAlex) and arXiv preprints that support a passage, and places \cite as a change to review.
  • Bibliography entries always come from the publisher's or arXiv's metadata.

Projects, history and sync

  • Import Prism exports (.zip) and folders; export any project as a .zip.
  • Every project is a git repository: history with diffs, and restoring a file or the whole project.
  • Push and pull to any https git remote, or to GitHub repositories picked or created from Refract; optional auto-push.

AI models

  • Your ChatGPT plan through "Sign in with ChatGPT" (refract login).
  • API keys for OpenAI, Anthropic, Google Gemini, OpenRouter, Mistral, DeepSeek, xAI and Groq; local models through Ollama; any OpenAI-compatible endpoint.
  • One model picker for all of them, grouped by provider, with search and the reasoning levels each model supports.

Accounts and security

  • Several users, each with their own projects, chats and connections.
  • Sign-in through Cloudflare Access, Refract's own sign-in page (passwords, and optionally OpenID Connect), or no sign-in on a private network.
  • refract users to add, rename, sign out, unlock and remove accounts.
  • Sign-in attempts limited per account and per address; credentials and API keys encrypted at rest; a strict Content-Security-Policy.

Distribution

  • refract binaries for macOS, Linux and Windows (amd64 and arm64).
  • A Docker image for amd64 and arm64 on GitHub Container Registry, with Tectonic and SyncTeX included.