Nutlope/gloss

A reader that writes answers in the margin. Select any line, ask, and an open model on Together AI answers beside it.

Gloss – AI‑powered reader for articles & PDFs

What it does: Gloss lets you open a web article or PDF, select any line of text, ask a question, and receive a concise answer that appears in the margin with a citation. It’s essentially an in‑page “ask‑the‑document” assistant.

How it works:

  • The UI is a Next.js app (App Router) styled with Tailwind.
  • When you ask a question, the selected text is sent to a large language model (DeepSeek V4.1 Flash or Kimi K3) via the Together.ai inference API.
  • For web‑based articles, Gloss can augment the query with results from Exa (a web‑search API).
  • PDFs are parsed client‑side using LiteParse; scanned pages are OCR‑processed with Qwen on Together.ai.
  • User accounts (optional) are handled by Clerk, and a Neon PostgreSQL database syncs your personal library across devices.

Key components:

  • LLM inference – Together.ai (DeepSeek, Kimi, Qwen) provides the generative answers.
  • Search – Exa API for up‑to‑date web references.
  • PDF handling – LiteParse for parsing, plus OCR via a Together‑hosted model.
  • Auth & storage – Clerk for authentication, Neon for persistent user data.

Getting started:

  1. Clone the repo.
  2. Create a .env.local (see .env.example) and add your Together AI, Neon, Clerk, and optional Exa API keys.
  3. Run npm install and npm run db:migrate.
  4. Launch with npm run dev and open http://localhost:3100.

Planned enhancements:

  • A browser extension that injects the margin UI into any web page.
  • Ability to compare two selected passages side‑by‑side.
  • Centralised rate‑limit store (e.g., Upstash) so shared‑key limits persist across multiple instances.

Who might use it: Researchers, students, or anyone who reads long articles/PDFs and wants quick, cited answers without leaving the document.

Related

  • Project
  • Project
  • Project
  • Project