TextFold: Fold Any Text Into 5 Levels of Detail — Not Summaries
TextFold: The Open-Source Tool That Folds Papers, Web Pages and AI Replies Into Five Levels of Detail
TextFold is an open-source reading tool that turns any long text into five zoomable levels of detail, from the full original down to a few words per section. Instead of summarizing, it keeps the author's own sentences at the first two levels and adds AI-written layers only where words must be dropped — so every zoom level stays anchored to what the author actually wrote. It reads papers, web pages, PDFs, office files and even your AI agent's replies, and it runs entirely on your own computer.
The project, created by Xia Chen and released under the Apache 2.0 license, recently renamed from PaperFold to TextFold as it grew beyond academic papers. Here's how its five levels work, what it can read, and why its approach to AI-assisted reading is fundamentally different from a chatbot summary.
How does TextFold's five-level folding work?
TextFold organizes every text into five levels, each with a defined relationship to the author's original words. This is the core of the project — levels are not loose summaries but a strict hierarchy of detail:
- Level 1 — Full: the paragraph exactly as written, in the author's words.
- Level 2 — Brief: each paragraph's one to three key sentences, kept verbatim from the author's text.
- Level 3 — Key: the paragraph's point and the reason for it, written by AI but resting on the Brief sentences.
- Level 4 — Takeaway: one line describing the spine of the section, written by AI.
- Level 5 — Topic: a few words per section, so the whole text becomes a map of section cards.
The zooming is continuous: as you move between levels, every word that survives slides to its new position while the rest fades around it. You can stop halfway, turn back, or open a single paragraph on its own — the way you'd zoom on a map rather than jump between separate documents.
The critical distinction: the first two levels contain zero paraphrasing. Nothing is reworded until Level 3, and even then each AI-written line is anchored to the author's sentences it rests on. That makes the fold auditable — you can always descend one level and verify the wording yourself.
What can TextFold read?
TextFold accepts links, files, and live browser pages across a wide range of formats. You can paste a link, drop one or several files, or click its browser button on whatever page you're currently reading.
Supported link sources
- Academic repositories: arXiv, PubMed Central, bioRxiv and medRxiv papers open as their sites structure them — an arXiv paper without an HTML version is read from its PDF, and other DOIs use open full text in Europe PMC.
- Any web page: the article itself, stripped of menus, ads and hidden content; interactive figures run in place, and MathJax or KaTeX formulas render as written.
- Wikipedia in any language, and GitHub repositories — the README opens with its pictures, badges and GIFs as on GitHub.
Supported file formats
- PDF: read directly by TextFold with figures cut from the page; scanned PDFs get a deeper conversion from the optional MinerU PDF engine (about 3.4 GB, installed once). When a PDF names a paper available online, that version opens beside your file.
- Office documents: Word, PowerPoint and Excel files, CSVs, EPUB e-books and saved web pages open immediately with headings, tables, pictures and formulas intact.
- Pictures, Markdown and plain text files are also supported, as are Zotero library items — arXiv items open from arXiv, others from their attached PDF, EPUB or Word file.
Documents you read are stored in a local library on your own machine, searchable with ⌘K, organized into folders, and sortable by type, import date or last opened.
Does TextFold send your data anywhere?
No — everything runs on your computer. TextFold is a local application: the desktop app for macOS (Apple silicon or Intel) or Windows bundles everything it needs, including Python, and the Python package runs a local server at http://localhost:3017. Your library lives in your system's app-data folder, and the browser extension hands pages only to TextFold on the same machine, and to nothing else.
The Zotero integration works the same way: it talks to the Zotero app already running on your computer, the way citation plugins do — no account, no API key, nothing sent to Zotero's servers, and nothing in your library modified.
The one external dependency is the AI model that writes Levels 3–5 and answers questions. Even that runs under your control, as covered next.
Which AI models does TextFold support?
TextFold uses a model you already have — there's no account to create and no bundled cloud service. On startup it looks for installed tools and, if it finds none, the first-run page offers several ways in:
- Automatic detection: Claude Code, Codex, Pi, WorkBuddy and Antigravity (experimental) are found and used directly, including their existing sign-ins. CodeBuddy's own CLI works too.
- A ChatGPT plan: a small local bridge signs in with your account (requires Node.js).
- OpenRouter in one click: authorize once and free models are ready to go.
- An API key: add providers in Settings — Anthropic, OpenAI, DeepSeek, Qwen, Zhipu GLM, Kimi, MiniMax, Google, Ollama, or any OpenAI-compatible endpoint.
Questions can also be routed to a stronger model than the one writing the levels, with an adjustable reasoning effort — so a cheap, fast model can handle folding while a more capable one answers your questions about the text.
How does TextFold work with Claude Code and Pi?
A TextFold mod puts the same five levels on every reply in Claude Code and Pi, so long agent output stops being a wall of text. Instead of a second model summarizing after the fact — which costs tokens and time — the fold is lossless and instant: the reply is simply displayed at the level you choose, and pressing a key restores any part of it.
In Claude Code (version 2.1.287 or later), install via the plugin marketplace, then press 1 through 5 while the prompt is empty: 1 shows every word, 2 each point with its reason, 3 just the points, 4 an outline of a long reply's sections, and 5 the answer in one sentence. Short replies (under about 80 words) always stay whole. The mod works by asking Claude to lead with the point — answer first, key sentence first in every paragraph — so the fold simply keeps what the model put first. There is no second model and no summary step.
In Pi (version 1.2.0 or later, on Node 22.15 or later), an extension provides the same five levels with Alt plus a digit or /fold commands — and it folds the model's thinking too, so a long coding turn reads in a few lines. Because Pi uses the mod's own engine, a reply folds identically at each level in both apps.
What are TextFold's browser and note-taking features?
A browser extension for Chrome, Edge and Brave (also in the Chrome Web Store) sends the page you're reading to TextFold with one click — including signed-in or paywalled pages, exactly as their scripts drew them. Firefox isn't supported yet. The extension finds the article the way reading views do, preserving headings, figures, formulas and footnotes, and opens the reader beside the page. It reads a page only when you click it.
Inside the reader, several features round out the workflow:
- Notes that zoom with the text: highlight passages or write in the margin, and your marks persist at every level and stay saved with the document. Highlights keep the color of the level they were made at.
- Ask about what you read: select a passage or ask about the whole text; the short answer comes first, and each point links back to the paragraph it rests on. A Look it up on the web option has a local agent search the web for the answer, with sources as links.
- Read beside the original: open a paper's own PDF next to the text, with each paragraph marked on its page, and zoom into figures.
- Translations: read in many languages, translated sentence by sentence with formulas typeset; a document's own levels are written in its own language.
- Editing and export: correct PDF conversion errors where you read them (with change tracking and regeneration of only edited sections), and save any page as a single portable HTML file, as Markdown at your current level, or as notes-only output.
How does TextFold connect to Zotero and Obsidian?
TextFold plugs into two of the most popular research and note-taking tools without syncing anything to the cloud. For Zotero users, a "Zotero library" view in TextFold mirrors the local Zotero app — collections, group libraries and search included — and opens any item while preserving its title, authors and citekey.
For Obsidian, a community plugin called TextFold Bridge (by contributor @adalach, requiring TextFold 0.10.18 or later) links notes to specific places in TextFold documents:
- Drag a paragraph, section or selection from the reader into a note and it lands as a callout with a
textfold://link back to its exact source location. - Your own notes fold at the five levels inside Obsidian, and after an edit only changed sections are re-folded — highlights find their passages again.
- A sidebar lists the passages a note cites plus your highlights and questions on referenced documents, importable as a note that can be updated later without losing your writing.
The combination effectively gives researchers a Zotero-to-reading-to-notes pipeline where every claim in a note can be traced back to the exact paragraph it came from.
Can developers and agents use TextFold programmatically?
Yes — a command-line interface and an open document format let scripts and agents consume folded text directly. The python3 -m textfold get command returns a document one level at a time, coarsest first, so an agent can read the map before spending its context on the full text:
python3 -m textfold get <link>prints the topic map of every section.--level key --section 3unfolds one section's points, each with its reason.--jsonoutputs the whole document in the open TextFold format, described indocs/format.md, where every model-written line is marked as such and anchored to the author's sentences it rests on.
A running TextFold instance also advertises itself in a server.json file, and in browsers supporting WebMCP — a draft web standard — an agent can read the passage you're viewing, save notes, import files or Zotero items, and organize folders as tools. For research pipelines, python3 -m textfold export saves a page as Markdown or JSON without your notes.
Frequently Asked Questions
What is TextFold?
TextFold is an open-source tool (Apache 2.0, formerly PaperFold) that folds papers, web pages, PDFs, office files and AI agent replies into five zoomable levels of detail — from the full text down to a few words per section — without paraphrasing the author's words at the top levels.
Is TextFold free?
Yes. The code is released under the Apache 2.0 license. Desktop apps for macOS and Windows and the Python package are free to download; you supply your own AI model or use free options like OpenRouter.
Does TextFold summarize text with AI?
Not exactly. Levels 1 and 2 use only the author's verbatim sentences. AI writes Levels 3 through 5 (points, takeaways and topics), but each AI-written line is anchored to the author's sentences it rests on, so you can always verify it against the original.
What formats does TextFold support?
Links from arXiv, PubMed Central, bioRxiv, medRxiv, Wikipedia and GitHub; any web page; and files including PDF, Word, PowerPoint, Excel, EPUB, HTML, CSV, pictures, Markdown and plain text. It also reads Zotero library items.
Does TextFold work in the browser?
Yes — extensions for Chrome, Edge and Brave (available in the Chrome Web Store) send the page you're reading to TextFold with one click, preserving signed-in state and page-rendered content. Firefox support is not yet available.
Does TextFold work with Claude Code?
Yes. A TextFold mod installs through the Claude Code plugin marketplace and puts five fold levels on every reply — from the full text down to a one-sentence gist — with no second model involved. It requires Claude Code 2.1.287 or later.
Is TextFold private?
TextFold runs locally on your computer, stores your library locally, and sends nothing to external servers beyond the AI model calls you configure. The browser extension and Zotero integration communicate only with applications on your own machine.
Key takeaways
- TextFold folds any text into five zoomable levels — Full, Brief, Key, Takeaway and Topic — with the author's verbatim sentences preserved at the top two levels, making every AI-assisted layer verifiable against the source.
- It reads nearly everything: arXiv and medical preprints, Wikipedia, GitHub READMEs, any web page, and PDF, Word, PowerPoint, Excel, EPUB, Markdown, CSV and image files.
- Everything runs locally — desktop apps for macOS and Windows, a Python package serving localhost, and integrations with Zotero, Obsidian, Claude Code, Pi and Chrome/Edge/Brave browsers.
- It uses the AI models you already have, from Claude Code and OpenRouter to any OpenAI-compatible API, with no mandatory account or bundled cloud service.
- An open format and CLI (
python3 -m textfold get) let agents and scripts consume folded documents programmatically, coarsest level first.
TextFold's bet is that reading is a zoom problem, not a summarization problem — and the distinction matters. Summaries ask you to trust a model's compression; folds let you descend back to the author's exact words whenever you want proof. For researchers drowning in papers or developers drowning in agent output, that shift from paraphrase to progressive disclosure is genuinely useful. If this overview helped you understand the tool, share it with someone who's tired of skimming walls of text — and give the project a star if you end up using it.