Skip to content
chenxiachanPublic

Repository files navigation

PaperFold

PaperFold

Zoom any text for your better understanding

Python 3.9+ 12 languages Runs on your computer Apache License 2.0

English · 简体中文

Try it → papers from different fields, a Wikipedia article and a GitHub README, nothing to install.


A paper folding from its full text into a map of its sections, and back



Also for agent output

Your agent writes more than you have time to read. A Claude Code mod folds every reply the same way, one key per level. More ↓

A reply in Claude Code folding from the full text to two sentences a paragraph, then one, and back, one key at a time

What's new

  • October 8, 2026: any GitHub README. Paste a repository's link and read its README at five levels, with its logo, badges and GIFs as on GitHub. A Markdown file keeps the HTML written in it, and the sidebar groups papers, Wikipedia articles, READMEs and documents.
  • October 8, 2026: read beside the original. Original, at the top of a paper, opens its PDF at the left (from arXiv, PubMed Central or bioRxiv) and shows each paragraph on its page as you read. A new paper opens as soon as it can be read, while its levels are written.
  • October 7, 2026: your agent's replies fold too. TextFold puts the five levels on every Claude Code reply. Press 5 for the answer in one sentence, 1 for every word.
  • October 6, 2026: more than arXiv. Paste the link or DOI of a paper on PubMed Central, bioRxiv or medRxiv, or a Wikipedia article in any language, or drag in a Markdown file of your own. Each opens at the same five levels.

Read with less in your head

A paper asks you to hold its whole argument in mind while you read it one paragraph at a time. PaperFold holds the argument for you. Fold the paper to see how its sections build on each other, unfold the part you care about, and the sentence you were reading never leaves the screen.

Level Each paragraph becomes In whose words
1 Full the paragraph as written the authors'
2 Brief its one to three key sentences, verbatim the authors'
3 Key its point and the reason for it AI
4 Takeaway one line on the spine of its section AI
5 Topic a few words; the paper becomes a map of section cards AI

What you get

  • Words that travel. As you zoom, every word that stays slides to its new place and the rest fade around it.
  • Zoom under your fingers. Pinch, ⌘-scroll or drag the level bar. Stop halfway, turn back, or open one paragraph alone.
  • Always know who is speaking. The authors' words are set in a serif and AI's in a sans serif. Each paragraph is colored by its role in the argument.
  • Ask, and see the evidence. Ask about a passage or about the whole paper. Every answer cites the paragraphs it rests on, one click away.
  • Notes that zoom with the paper. Highlight and write in the margin, and what you marked stays as you zoom out. Export to Obsidian, PDF or JSON.
  • Your language. Twelve languages, translated sentence by sentence, with every formula as typeset.
Highlights in the full text and a note in the margin The highlighted passages kept at the Takeaway level
Highlight and write in the margin… …and keep what you marked as you zoom out.

Get started

git clone https://github.com/chenxiachan/paperfold.git
cd paperfold
python3 -m pip install -r requirements.txt
python3 -m adr serve

Open http://localhost:3017, which the last command prints. The first time, connect a model; then paste the link or DOI of a paper on arXiv, PubMed Central, bioRxiv or medRxiv, a Wikipedia article, or a GitHub repository (its README), or drag in a Markdown file, and pick a language.

You need Python 3.9 or newer (the one macOS ships with works). An arXiv paper needs its HTML version, as most papers since late 2023 have; a bioRxiv or medRxiv preprint, or a Wikipedia article in any language, is read from the site itself; any other paper needs its open full text in Europe PMC (open-access articles in PubMed Central, and preprints such as Research Square's); a Markdown file needs nothing.

Connect a model

PaperFold uses a model you already have, and there is no account to create. It looks for one when it starts; if it finds none, the first page offers the ways in.

You have What to do
Claude Code, Codex or Pi Nothing. PaperFold finds it and uses it.
A ChatGPT plan Click Use my ChatGPT plan. A small bridge starts on your computer and signs in with your account (needs Node.js).
Nothing yet Click OpenRouter in one click. Authorize once, and free models are ready.
An API key Settings › Add provider: Anthropic, OpenAI, DeepSeek, Qwen, Zhipu GLM, Kimi, MiniMax, Google, Ollama, or any OpenAI-compatible endpoint.

In the reader

Do To
Pinch, or ⌘ / Ctrl + scroll zoom around the pointer
1 to 5 jump to a level
Click a paragraph open just that paragraph
Click a figure see it enlarged
Original, at the top read beside the paper's PDF
Select text highlight, write a note, or ask
Ask the paper, bottom right ask about the whole paper
L next language

Share a paper

python3 -m adr export 2201.11903

This writes one self-contained HTML file to out/2201.11903/ that opens anywhere without a server. PaperFold's license covers its code: a paper, and the levels and translations made from it, stay under the license its authors chose, shown under every title. Most arXiv papers allow reading but not redistribution, so share a page only when that license allows it, as Creative Commons licenses do.

In Claude Code

TextFold puts the five levels on every reply in Claude Code. Press 5 for the answer in one sentence, 3 for the point of every paragraph, 1 for every word. Nothing is paraphrased, so at every level you read exactly what Claude said.

Install it, and see what each level gives you

It needs Claude Code 2.1.287 or later, in the terminal or in the Code tab of the Desktop app.

claude plugin marketplace add chenxiachan/paperfold
claude plugin install textfold@paperfold
Key Level What you get
1 Full every word Claude wrote
2 Brief each point, with the reason behind it
3 Points just the points, at a glance
4 Outline the map of a long reply: its sections, and what each one says
5 Gist the answer, in one sentence

Type the digit while the prompt is empty, or pick a level in the row above the prompt. Short replies stay whole: one under about 80 words, or one a fold would barely shorten, always shows as written.

Start folded. A session starts at Full. To start at another level, run /config and set Starting level; in the session, the row above the prompt and the keys 1 to 5 still change it.

Why you can trust a fold. TextFold asks Claude to lead with the point: the answer first in every reply, the key sentence first in every paragraph. A fold keeps what Claude put first. There is no second model and no summary, so a fold costs nothing, takes no time, and never puts words in Claude's mouth.

More in plugins/textfold.


If PaperFold makes papers easier to read, ⭐ star it so others can find it.


Apache 2.0 © 2026 Xia Chen · Development · Contributing · Feedback

Releases

Sponsor this project

Packages

Contributors

Languages