Repolode
chenxiachan

chenxiachan/textfold

Local-first reader that folds papers, web pages, files and AI replies into five levels of detail, from a one-screen map down to the full text.

Stars
933
Forks
84
Open issues
14
Last commit
yesterday

What is it?

TextFold turns a paper, web page, GitHub README, Word or PDF file, or an AI assistant's reply into five levels of detail: the full text, a brief of the key sentences, the point and reason of each paragraph, a one-line takeaway per section, and a topic map of section cards. Each level keeps the author's own sentences where it can, and AI-written lines are marked as such and tied back to the passages they rest on.

The reader runs on your computer and uses a model you already have, such as Claude Code, Codex, a ChatGPT plan, OpenRouter, or an API key for providers like Anthropic, OpenAI, DeepSeek or Ollama. Papers from arXiv, PubMed Central, bioRxiv and medRxiv are read from their structured text, and other PDFs are converted locally. Highlights and notes stay attached to passages as you zoom.

Beyond the reader, the project offers a Claude Code plugin and a Pi extension that fold every agent reply by key press, a `textfold get` command for agents and scripts, a Zotero library view, and an Obsidian plugin called TextFold Bridge.

Key features

  • 01Five fold levels, from full text to a one-word topic map
  • 02Imports arXiv, PubMed Central, Wikipedia, GitHub READMEs, web pages, PDFs and Office files
  • 03Folds Claude Code and Pi replies by keypress
  • 04Highlights, notes and questions attached to passages
  • 05Zotero library integration and an Obsidian plugin
  • 06Command-line `textfold get` for agents and scripts

Use cases

  • Skimming a long research paper before deciding whether to read it in full
  • Reading long agent replies in Claude Code or Pi without scrolling through every word
  • Feeding a document to an AI agent one level at a time to save context
  • Keeping annotated papers in a Zotero or Obsidian workflow

Quick start

  1. 1

    Install the Python package

    python3 -m pip install textfold
  2. 2

    Start the local server

    python3 -m textfold serve
  3. 3

    Open http://localhost:3017 in your browser and connect a model

Things to know

  • Most features need a language model: an existing agent such as Claude Code, a ChatGPT plan, OpenRouter, or an API key.
  • Scanned PDFs and the most complete parsing need the optional PDF engine, about 3.4 GB.
  • Requires Python 3.9 or newer.

In collections

Topics

#paper-reader#summarization#llm#research-papers#arxiv#local-first#translation#open-source#semantic-zoom

FAQ

What is textfold?
Local-first reader that folds papers, web pages, files and AI replies into five levels of detail, from a one-screen map down to the full text. TextFold turns a paper, web page, GitHub README, Word or PDF file, or an AI assistant's reply into five levels of detail: the full text, a brief of the key sentences, the point and reason of each paragraph, a one-line takeaway per section, and a topic map of section cards. Each level keeps the author's own sentences where it can, and AI-written lines are marked as such and tied back to the passages they rest on.
Is textfold free to use? What license does it have?
textfold is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is textfold still maintained?
Actively maintained. The last commit to textfold was on Nov 6, 2026.
What can I use textfold for?
Skimming a long research paper before deciding whether to read it in full Reading long agent replies in Claude Code or Pi without scrolling through every word Feeding a document to an AI agent one level at a time to save context Keeping annotated papers in a Zotero or Obsidian workflow
How do I install textfold?
Install the Python package: python3 -m pip install textfold Start the local server: python3 -m textfold serve Open http://localhost:3017 in your browser and connect a model
Where can I get textfold?
The source code and installation instructions are on GitHub: https://github.com/chenxiachan/textfold

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects