Skip to main content

Gloss

Ask questions right on your lecture slides. A local study app powered by your own Claude Code or Codex.

把 PDF 课件变成可以提问的学习空间:思维导图、逐页讲解、在 slide 上框选提问、笔记。全部在本地运行,用你自己的 Claude Code 或 Codex。

What it does

Import a PDF of lecture slides and Gloss gives you:

  • A mind map of the lecture: topics on the left, every slide as a thumbnail, with badges for slides you asked about or took notes on.
  • A workspace for each slide: the slide, an explanation of it, and your notes for that page.
  • Questions anchored to the slide: drag a box around anything (a formula, a diagram) and ask about it. The answer appears next to that spot. Minimize it and a marker stays on the slide; click it later to pick the conversation back up. You can also select a sentence in the explanation and ask about just that.
  • The lecturer's words, matched to each slide (optional): upload a transcript (.txt, .vtt, .srt) and Gloss works out which part of the talk goes with which slide. Explanations and answers then draw on what was actually said in class.
  • Answers that know the whole course: when a question reaches beyond the current slide ("where was this symbol defined?", "how is this different from the method on slide 12?"), Gloss searches the rest of the lecture and tells you which slide to look at.
  • One file per course. Everything — the slides, explanations, every question and answer, your notes and layout — is saved in a single .gls file as you go (files from before 0.4 end in .gloss and keep working). There is no save button. Close it, reopen it, it's all there.

Feeding slides straight into a chat gives you one long linear transcript where follow-ups lose track of which part of which slide they were about. Gloss keeps each question attached to the place it came from.

Requirements

  • Python 3.11+ and uv.

  • One AI coding CLI, installed and logged in — either works, and Gloss finds it on its own:

    • Claude Code with a Claude plan that includes it (run claude once and use /login), or
    • OpenAI Codex CLI with a ChatGPT plan that includes Codex (run codex login).

    If both are installed, the home page asks which one to use, and you can switch later from the name next to the Gloss title. Gloss calls the CLI on your machine; it never sees your credentials. Explanations and answers count toward your plan's usage limits, so on a smaller plan you may want a lighter model (see Configuration). You can also use an API key instead of a plan (see below).

You do not need Node.js: the web interface ships pre-built.

Quick start

Install from PyPI (the package is called glossr; the command is gloss):

uv tool install glossr  # or: pipx install glossr
gloss doctor            # checks Python, which AI CLI is installed and logged in, and the install
gloss                   # starts the app and opens it in your browser

To try it without installing: uvx glossr. To update later: uv tool upgrade glossr.

Running from a clone instead (for development, or the latest unreleased code):

git clone https://github.com/rongrgu/gloss && cd gloss
uv run gloss doctor
uv run gloss

Then create a course folder and import a lecture's PDF slides into it (and, if you have them, past quizzes or exams). The first time you open a lecture, Gloss organizes it into a mind map (one call, about 10–20 seconds). Each slide's explanation is generated the first time you stay on that slide for a moment, and then saved.

Other commands (prefix with uv run when running from a clone):

gloss --port 9000 --no-browser
gloss doctor --live          # also sends a tiny test prompt (uses a little quota)
gloss export course.gls      # writes course.md

Using it

  • Language — the interface is in English by default; the 中文 / EN button in the top bar switches it (and the language Gloss explains and answers in, unless language is set in config.toml). Content already generated keeps its language; use Regenerate to redo it.
  • Mind map — drag to pan, scroll or use the buttons to zoom, click a topic to fold it. Click a thumbnail to open that slide. "Regenerate map" asks Gloss to regroup the slides; your questions and notes are untouched.
  • Slide workspace — ← / → change pages, or swipe left / right with two fingers on the trackpad over the slide (like switching desktops on a Mac). The Layout menu switches between stacked and side-by-side, hides panels, and resets; drag the dividers to resize (double-click resets one).
  • Ask — drag a rectangle on the slide, type your question, press Enter. Follow up in the same box. Questions on the same slide are answered one at a time, so a second question may briefly show as queued. To ask about part of the explanation, select the text and press "Ask about this"; those questions show up as numbered chips under the explanation.
  • Transcript — on the course page, "Upload transcript". Gloss aligns it to the slides (one call, usually under 20 seconds). Each slide's explanation panel can show its excerpt ("Transcript passage"). Explanations generated before the upload aren't redone automatically — use "Regenerate" on the slides you care about.
  • Notes — plain text per slide, saved automatically. "Clip to notes" under an answer copies the question and the answer's first paragraph into the page's notes.
  • Session log — shows exactly what was sent to the AI for this slide (for the curious).
  • Pick up where you left off — the library home (library on the left; this and every course's quizzes on the right) tells you what you were studying last and on which slide (one click continues there), which questions are still marked “still confused”, which quiz you haven't finished, your open weak points and your latest cheatsheet. It is read from your files; no AI call.
  • Library — the home page is your library folder (~/Gloss by default). Organize it however you like: folders for school, year, term, course… A folder that holds lectures is a course. Lectures are listed in the order you imported them; drag to reorder, or drag onto a folder (or a breadcrumb) to move. "Import lecture slides" puts the new lecture in the folder you are looking at. Folders on disk are the source of truth, so organizing in Finder works too.
  • Got it / still confused — under each answer, mark whether you understand now. Unresolved questions turn orange on the slide and on the mind map, and quizzes and summaries take your marks into account.
  • Finish lecture — on the mind map, "Finish lecture" has Gloss write a study summary from your questions, notes and quiz answers: what the lecture covered, what you asked (grouped by concept), what is still unclear, what you now understand, open questions, and slides worth reviewing. Every point links back to the question it came from. When you ask more later, "Update summary" refreshes it.
  • Study profile — each course keeps a list of what you still find unclear, by concept and with evidence (your questions, marks and quiz answers). Finishing a lecture updates it; quiz answers and marks move items between "still unclear", "improving" and "resolved" on their own. You can resolve, reopen, rename, merge or delete items, and undo the last automatic change. New explanations and question sessions mention a weak point when, and only when, the slide is related to it (turn this off with use_profile = false).
  • Cheatsheet — on a course's Study profile, "Generate cheatsheet" writes a printable summary from your own notes, the questions you asked (with the answers' key points) and what is still unclear, optionally looking at past exams. Pick the lectures and the length (1 page, 2 pages or no limit; A4, two columns). The cheatsheet opens in an editor that works like Word: type, format, add tables, click a formula to change it. Or ask Gloss for changes in the chat on the left (select text to change only that part). Every change is a version you can go back to. Print it to PDF or download it as a Word file; with pandoc installed, formulas become editable Word equations.
  • Quiz — on any course (or any folder above it), "New quiz" has Gloss write practice questions for exam prep. It reads the slides and, above all, what you asked and noted while studying, so it targets where you got stuck, and it covers topics you never asked about too. Each question cites the slide it comes from, says why it was chosen, and has an answer and explanation; a second pass checks every answer key against the slides. Multiple choice is marked automatically; for written answers you compare with the reference answer and mark yourself. Generation takes about a minute and uses noticeably more quota than a question.
    • Practice exams / quizzes — upload earlier quizzes or exams (PDF or Word .docx) with "Import exam / quiz"; they are listed under the course's Materials › Practice Exam / Quiz. New quizzes look at their question styles and difficulty, and Replicate a past exam writes a fresh set with the same structure: same question types, topics and difficulty, new numbers and conditions, each still tied to a slide.
    • Extra instructions — say what you want in your own words, e.g. "6 multiple-choice and 2 derivation questions, focus on backpropagation from lecture 3". They take precedence over the count and type settings; true/false is asked as two-option multiple choice and fill-in-the-blank as short answer.
  • Export — "Export Markdown" on the course page (or gloss export) writes the map, explanations, questions and answers, and notes as one Markdown file.

A .gls file is self-contained: send it to a classmate and they can read everything in Gloss, even without Claude Code or Codex installed (they just can't ask new questions).

Your data, your own AI account

  • Everything stays on your computer. Courses are saved as .gls files (by default in ~/Gloss/). The recent-files list lives in ~/.gloss/. Gloss runs a small web server on your own machine (127.0.0.1) and has no cloud service, no account, no telemetry.
  • What goes to the AI provider: when you ask for an explanation, a question, a mind map, a quiz or a cheatsheet, Gloss runs your claude or codex command with the relevant slide text, images and your notes, so that content is processed by Anthropic (Claude Code) or OpenAI (Codex) under your account, exactly as if you had pasted it into the CLI yourself.
  • It uses your own login and your plan's usage. Gloss does not log you in, store tokens, or proxy anyone else's account. Each person runs their own copy with their own account.
  • About the providers' terms: Anthropic does not allow third-party products to offer claude.ai login or to use people's subscription usage unless approved, and expects commercial products to use API keys. Gloss is a free, source-available tool that you run yourself, driving your own locally installed CLI. It is not affiliated with or endorsed by Anthropic or OpenAI. Whether CLI usage keeps counting toward subscription limits is up to each provider and may change; you can switch Gloss to an API key instead (see Choosing the LLM).
  • API keys in your environment: if ANTHROPIC_API_KEY is set, Claude Code bills that key instead of your subscription; likewise OPENAI_API_KEY / CODEX_API_KEY for Codex. Gloss removes them when it calls the CLI, so your plan is used, and gloss doctor warns you if they're set.
  • Locked down by default: the AI can only read, never write or run anything. Claude Code gets only read-only file tools (Read, plus Grep/Glob for searching the course), restricted to that course's own working folder (--restricted); Codex runs in its read-only sandbox (--sandbox read-only) in that same folder. Neither can edit files or read your other courses. The local server only accepts requests from localhost and refuses requests from other websites.

Lecture slides, transcripts and recordings belong to their authors. Use Gloss with material you're allowed to use, and don't commit course files or .gls / .gloss files to this repository (they're in .gitignore). Tests generate their own PDFs.

Configuration

Copy config.example.toml to config.toml (in the repo; or ~/.gloss/config.toml if you installed Gloss with pip):

key default meaning
model "sonnet" the model for everything — for claude an alias (haiku, sonnet, opus) or a full name. codex ignores Claude aliases and uses its own default; openai_api then uses gpt-5.5
language (unset) language for explanations, answers and the mind map. Unset, it follows the interface language (English by default; switch with the 中文 / EN button in the top bar). Set it to pin one, e.g. "中文"
concurrency 2 how many AI calls may run at once (different slides)
qa_retrieval true let answers search the rest of the course when a question needs it
quiz_model (unset) model for quiz generation; unset uses model (newer form: [llm.models] quiz)
quiz_verify true check every quiz answer key against the slides with a second call
digest_model (unset) model for lecture summaries and study-profile updates; unset uses model (newer form: [llm.models] digest)
use_profile true mention relevant weak points from the study profile in new explanations and question sessions
[llm] provider (detected) which LLM answers: claude, codex, anthropic_api or openai_api (see below). Unset, Gloss uses the installed CLI, or asks on the home page when both are. The older top-level provider = "claude_cli" still works
[llm.models] (empty) a model per use: outline (mind map, transcript alignment), explain, qa, digest, quiz, cheatsheet; empty uses model
library ~/Gloss where imported courses are saved
claude_bin / codex_bin found on PATH path to the claude / codex executable

Choosing the LLM: your CLI login, or an API key

You usually don't need to configure anything. Gloss looks for Claude Code (claude) and Codex (codex) when it starts: if only one is installed it uses that one; if both are, the home page asks which to use; the one in use is shown next to the Gloss title at the top left, and clicking it lets you switch; if neither is, the home page and gloss doctor tell you. gloss doctor shows which one is in use (--live sends a tiny test prompt).

To always use a particular backend, including the API ones, set provider under [llm] in config.toml:

provider what it uses who pays
claude (default) your logged-in Claude Code (claude) your Claude plan
codex your logged-in OpenAI Codex CLI (codex; run codex login first) your ChatGPT / Codex plan
anthropic_api the Anthropic API (pip install 'glossr[anthropic]') per token, the key in ANTHROPIC_API_KEY
openai_api the OpenAI API (pip install 'glossr[openai]') per token, the key in OPENAI_API_KEY
  • CLIs use your own account and plan. Gloss runs the CLI on your machine; it never sees your login. If ANTHROPIC_API_KEY (for claude) or OPENAI_API_KEY / CODEX_API_KEY (for codex) is set, Gloss removes it when calling the CLI so your plan is used, not the key (for codex, codex_auth = "api_key" under [llm] opts into the key).
  • API keys are read from the environment only — never from config.toml, never written to logs, .gls files or exports.
  • Both CLIs run read-only. The model can read the course's own working folder and nothing else is ever written by it; Gloss writes everything itself after checking it.
  • API providers differ in two ways: they can't search the rest of the course or make quizzes (both need tools), and every question resends the slide and its earlier Q&A. Gloss orders that context so the repeated part is served from the providers' prompt cache. With anthropic_api, models that support it get Anthropic's server-side refusal fallback. With openai_api, the default model is gpt-5.5; set model (or [llm.models]) to choose another.
  • Switching provider keeps everything: a page's questions continue with the new provider, which is given the earlier Q&A on that page.

Changing how Gloss explains things: the prompts are plain Markdown in claude_workspace/ (CLAUDE.md for the tutor's role, prompts/*.md for each task). Edit them to change the style, for example exam-focused or more concise. Changes apply to new explanations and to new question sessions.

Troubleshooting

Start with uv run gloss doctor.

  • "claude not found" / "codex not found" — install the CLI, or set claude_bin / codex_bin in config.toml.
  • "not logged in" — for Claude Code, run claude in a terminal and use /login; for Codex, run codex login.
  • An answer failed — the question is kept; press 重试 (retry). Common causes are usage limits or a network problem; the error message comes from the CLI (Claude Code or Codex).
  • Port in use — Gloss picks the next free port automatically, or pass --port.

Development

Common commands:

uv run pytest                               # backend tests
cd frontend && npm install && npm test      # frontend tests
npm run dev                                 # dev server, proxies /api to `uv run gloss --port 8765`
npm run build                               # rebuilds backend/gloss/static (committed; a test checks it's current)

License

Functional Source License 1.1, Apache 2.0 Future License (FSL-1.1-ALv2).

You can use, modify and share Gloss for anything except offering it, or something substantially similar, as a competing commercial product or service. Personal study, teaching, research and internal use are all fine. Each release becomes available under the Apache License 2.0 two years after it is published.

Versions up to and including 0.3.1 were released under the MIT License and remain available under it.

Metadata

Release files for glossr 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glossr 0.5.1
File Size Uploaded Provenance Actions
glossr-0.5.1.tar.gz 1.6 MB With provenance Details for glossr-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glossr 0.5.1
File Interpreter ABI Platform Actions
glossr-0.5.1-py3-none-any.whl Python 3 none any Details for glossr-0.5.1-py3-none-any.whl

Total release size: 3.2 MB

Release files / glossr-0.5.1.tar.gz

Download URL glossr-0.5.1.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
384b997fa782fc1a3cccf8dd3c7f000e4a60023cf719cb6e41c9f3741f58defd
BLAKE2b-256 checksum
How to use checksums
9f4ce4994bfa32d52c8cfa8bdc9a4128832f007320e3f67baf10c614da907ae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / glossr-0.5.1-py3-none-any.whl

Download URL glossr-0.5.1-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0987640d50b448244c9e5dd6463ebaee6ff3555f57d67c11d608a2d600b055f9
BLAKE2b-256 checksum
How to use checksums
91ced84114c15b24681821e654f1b8583df42eafa70474881d941c91b4672e23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for glossr 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for glossr-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page