[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-11393":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":37,"trendingCount":16,"starSnapshotCount":16,"syncStatus":38,"lastSyncTime":39,"discoverSource":40},11393,"spinedigest","oomol-lab\u002Fspinedigest","oomol-lab","distill any book down to its spine","https:\u002F\u002Finkora.oomol.com\u002Fdownload\u002Fsdpub",null,"TypeScript",311,25,1,3,0,8,10,143,24,75.24,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33,34],"ai-agents","cli","jinja2","knowledge-graph","llm","sdpub","summarization","typescript","2026-06-12 04:00:55","\u003Cdiv align=center>\n  \u003Ch1>SpineDigest\u003C\u002Fh1>\n  \u003Cp>English | \u003Ca href=\".\u002FREADME_zh-CN.md\">中文\u003C\u002Fa>\u003C\u002Fp>\n  \u003Cp>\n    \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fspinedigest\">\u003Cimg alt=\"npm version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fspinedigest\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fopensource.org\u002Flicenses\u002FApache-2.0\">\u003Cimg alt=\"License: Apache 2.0\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-blue.svg\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fnodejs.org\u002F\">\u003Cimg alt=\"Node >=22.12.0\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fnode-%3E%3D22.12.0-brightgreen\">\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fdiv>\n\n![SpineDigest Terminal Demo](.\u002Fdocs\u002Fimages\u002Fterminal-en.png)\n\n**Distill every book down to its spine**: SpineDigest feeds long-form books into an LLM pipeline and distills them into their essential content. The output isn't just a text summary — it also builds a chapter topology and a knowledge graph so the structure of the whole book is visible at a glance.\n\n![Inkora screenshot](.\u002Fdocs\u002Fimages\u002Fapp-screenshot-en.png)\n\n\u003Cdiv align=center>\n  \u003Csub>\u003Ca href=\"http:\u002F\u002Finkora.oomol.com\u002Fdownload\u002Fsdpub\">Inkora\u003C\u002Fa> opening a .sdpub file\u003C\u002Fsub>\n\u003C\u002Fdiv>\n\n## Install\n\nRequirements:\n\n- Node `>=22.12.0`\n- For source digestion from EPUB, Markdown, or TXT: a supported LLM provider plus credentials\n- For `.sdpub` re-export or `sdpub` inspection only: no LLM access required\n\nTry it without a global install:\n\n```bash\nnpx spinedigest --help\n```\n\nGlobal install:\n\n```bash\nnpm install -g spinedigest\n```\n\nTo explore the CLI surface first, start with:\n\n```bash\nspinedigest --help\nspinedigest help ai\n```\n\n## Quick Start\n\nThe first two examples below create a new digest from source input, so they require LLM configuration first.\nIf you need config setup details, run:\n\n```bash\nspinedigest help config\n```\n\nDigest an EPUB into Markdown:\n\n```bash\nspinedigest --input .\u002Fbook.epub --output .\u002Fdigest.md --prompt \"Preserve emotional shifts for both major and supporting characters.\"\n```\n\nSave a reusable archive first, then export later:\n\n```bash\nspinedigest --input .\u002Fbook.epub --output .\u002Fbook.sdpub\nspinedigest --input .\u002Fbook.sdpub --output .\u002Fbook.epub\n```\n\nPipe from stdin, receive on stdout:\n\n```bash\ncat .\u002Fchapter.txt | spinedigest --input-format txt --output-format markdown\n```\n\nFull flag reference: [CLI Reference](.\u002Fdocs\u002Fen\u002Fcli.md).\n\n## Why We Built This\n\nPeople say you can't summarize a whole book with an LLM because the context window isn't long enough. But consider this: human short-term memory holds only 7±2 items (Miller's Law) — far shorter than any LLM context window. Humans still manage to read entire books and write summaries.\n\nThe bottleneck isn't the window. It's knowing what to cut.\n\nA good summary can't preserve everything, and deciding what to drop is harder than deciding what to keep. There's no universal standard for what matters, either. It depends entirely on why you're reading: \"What practical advice does the author give?\", \"What's the central argument?\", \"How does the protagonist change?\" Each purpose leads to completely different trade-offs. Ask an AI to summarize without any direction and it genuinely doesn't know how — there's no single right answer that works for everyone.\n\nSpineDigest solves this with a staged pipeline.\n\nFirst, an LLM reads the source text section by section, simulating the way human attention is drawn to key ideas. It extracts a set of [chunks](\u003Chttps:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FChunking_(psychology)>) — the term cognitive psychology uses for discrete units of information in working memory. Each chunk is an attention landing point: one independent knowledge unit from the original text.\n\nNext, the pipeline hands off to a classical algorithm. I build a knowledge graph with chunks as nodes, connect them by conceptual relevance, then use graph traversal and community detection to cluster the semantically related ones together. Each cluster is serialized in original reading order into what I call a snake — a threaded knowledge chain that winds through the source text, linking related ideas end to end.\n\nFinally, the summarization phase switches back to LLMs, using an adversarial Multi-Agent framework with two roles: a respondent who writes the summary, and a panel of professors who challenge it.\n\n**Every professor holds a snake.**\n\nPicture a dissertation defense. The respondent stands at the front. The professors sit around the table, each holding a section of the original text, each measuring the draft against your stated extraction goal. They take turns: you missed this point, you didn't give that passage fair treatment. The respondent has to answer every challenge — they can't fully ignore anyone, but they can't fully satisfy everyone either. After several rounds, the final summary is the result of that pressure: a forced compromise where every part of the source gets some representation, even if it's just a sentence, and nothing is erased entirely.\n\n![SpineDigest architecture](.\u002Fdocs\u002Fimages\u002Fflowchart.svg)\n\nYour intent runs through the whole pipeline. During the reading phase, the AI's attention is already shaped by what you told it to care about — your interests determine where the chunks land. During the defense phase, the professors apply that same goal as their evaluation standard. Content that aligns with your stated purpose gets protected by multiple professors at once; content that doesn't loses its advocates and gets pushed out under sustained pressure. The one sentence you wrote at the start keeps working at both ends.\n\n## The `.sdpub` Format\n\nEvery time SpineDigest finishes processing, it produces a `.sdpub` file. Think of it as a processed archive: it holds not just the summary text but the complete knowledge structure built along the way — chunks, snakes, the full concept graph.\n\nWith that archive on hand, you can export to EPUB, Markdown, or plain text any time without re-running the LLM pipeline. The trade-off: exported formats carry the text but lose the structural data. The chapter topology, snake connections, and knowledge graph live only inside `.sdpub`. If you might want to re-export later, or browse the book's structure in a visualization tool, keep the file around.\n\nTo open a `.sdpub` file, use **[Inkora](http:\u002F\u002Finkora.oomol.com\u002Fdownload\u002Fsdpub)** — a free app built specifically for it, with chapter topology and knowledge graph views.\n\nFor the internal layout and parser guidance, see the [format spec](.\u002Fdocs\u002Fsdpub.md).\n\n## Inputs and Outputs\n\n| Format             | Input | Output |\n| ------------------ | ----- | ------ |\n| `.epub`            | ✓     | ✓      |\n| `.md`              | ✓     | ✓      |\n| `.txt`             | ✓     | ✓      |\n| `.sdpub`           | ✓     | ✓      |\n| `stdin` (txt \u002F md) | ✓     | —      |\n| `stdout`           | —     | ✓      |\n\nRequirements: Node `>=22.12.0` and a supported LLM provider with credentials. `.sdpub` input does not require LLM access.\n\n## Library Usage\n\nSpineDigest also exposes a programmatic API for embedding the pipeline in your own Node or TypeScript code. See [Library Usage](.\u002Fdocs\u002Fen\u002Flibrary.md).\n\n## Related Projects\n\n- [PDF Craft](https:\u002F\u002Fgithub.com\u002Foomol-lab\u002Fpdf-craft): If your source material is a scanned PDF, PDF Craft can convert it into EPUB or Markdown before you feed it into SpineDigest.\n- [EPUB Translator](https:\u002F\u002Fgithub.com\u002Foomol-lab\u002Fepub-translator): If your goal is bilingual reading rather than summarization, EPUB Translator turns an EPUB into a bilingual edition while preserving the original layout.\n\n## For AI Agents\n\nSpineDigest's CLI-first design makes it easy to call directly, with no extra integration code.\n\n- **Prefer the CLI.** Use the programmatic API only when code-level integration is explicitly required.\n- **Use help as the discovery surface.** Start with `spinedigest --help` as the root page, then follow `spinedigest help ai`, topic pages, or command-specific `--help` before guessing behavior.\n- **Trust `--help`.** Every command in the CLI exposes usage guidance through `--help`.\n- **Use explicit paths.** Pass `--input` and `--output` for deterministic, repeatable runs.\n- **Check exit codes.** Success returns `0`; failure returns non-zero with a plain-text error on `stderr`.\n- **stdin is narrow.** Only `txt` and `md` are accepted, and only in non-interactive flows.\n- **No LLM needed for `.sdpub`.** Re-exporting an archive never calls an LLM provider.\n- **Keep the archive.** If the same digest might need re-exporting, treat `.sdpub` as the intermediate artifact.\n\nUseful help entry points:\n\n```bash\nspinedigest help ai\nspinedigest help task\nspinedigest help config\nspinedigest help env\nspinedigest help config-file\nspinedigest help sdpub\n```\n\nFull agent guidance: [AI Agent Guide](.\u002Fdocs\u002Fen\u002Fai-agents.md).\n","SpineDigest 是一个用于将长篇书籍提炼成核心内容的工具。它通过LLM（大语言模型）流水线处理书籍，并生成不仅包含文本摘要，还构建了章节拓扑和知识图谱的输出，使整本书的结构一目了然。该项目使用TypeScript编写，支持从EPUB、Markdown或TXT文件中提取信息，并能够导出为多种格式，包括自定义的.sdpub格式。适用于需要快速理解书籍主要内容或者希望以更结构化方式浏览书籍的研究者、学生以及任何对高效阅读感兴趣的读者。",2,"2026-06-11 03:31:46","CREATED_QUERY"]