npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

any2book

v0.4.0

Published

Convert personal knowledge files to faithful EPUB3 books, with installable Agent Skills support.

Readme

Any2Book

Any2Book converts personal knowledge files into faithful, reflowable EPUB3 books. It ships as both a standalone CLI and an installable Agent Skill.

Install

npx any2book@latest install

# Or install the CLI globally first:
npm install --global any2book
any2book install

The install command defaults to installing the global CLI and Agent Skill. It detects supported agent CLIs and lets you choose where to install the skill:

  • Shared Agent Skills root (~/.agents/skills)
  • Claude Code
  • OpenAI Codex CLI
  • Pi
  • Gemini CLI
  • OpenCode
  • Cursor

The installer asks what you want to convert, then derives the implementation dependencies automatically. Users choose needs such as text, Word/HTML, PDF, EPUB, or MOBI rather than choosing Pandoc, uv, or Calibre directly.

For CI or scripted setup:

any2book install --usage both --agent claude --agent codex --source pdf --source documents --yes
any2book install --usage agent --all --all-sources --yes
any2book install --usage cli --source text --skip-deps --yes
any2book skill-status
any2book uninstall-skill --agent claude

npx any2book@latest install follows the same explicit installer pattern as BMAD: npx downloads the package temporarily, invokes its any2book bin, and passes install to the CLI.

System requirements

  • Node.js 22+
  • Python 3.11+
  • uv
  • Pandoc
  • Optional: Calibre (ebook-convert) for MOBI
  • Recommended: EPUBCheck for complete EPUB3 validation

Python dependencies are isolated under ~/.cache/any2book/venv by default. Override this with ANY2BOOK_PYTHON_ENV.

CLI

any2book doctor
any2book inspect notes.md
any2book convert notes.md --output dist/notes.epub --title "My Notes"
any2book convert document.pdf --ai claude --output dist/document.epub
any2book convert document.pdf --ai codex --output dist/document.epub
# Review more aggressively while retaining patch guardrails:
any2book convert document.pdf --ai claude --ai-minimum-confidence 0.85 --output dist/document.epub
any2book preview dist/document.any2book/preview

Repeatable conversion:

cp configs/default.yaml any2book.yaml
any2book convert input.docx --config any2book.yaml

Supported inputs are TXT, Markdown, local HTML, DOCX, text-based PDF, EPUB, and MOBI. Scanned PDF/OCR, web URLs, feeds, and media are planned adapters.

For safe EPUB validation, Any2Book requires Expat 2.6.0 or newer and parses at most 64 MiB per XML or CSS resource, 2 MiB per JavaScript resource, 20,000 unique references per resource, and 256 MiB across all parsed resources in one EPUB. XML is capped at 200,000 elements and 4,096 levels per resource, and CSS function nesting is capped at 4,096 levels. JavaScript parsing is interrupted after 2,500,000 parser operations per publication, and AST inspection is capped at 500,000 syntax-node and scope-resolution steps. Embedded data URLs are allowed without separate manifest entries, while EPUB-prohibited package links, top-level browsing links, statically identifiable window.open/document.open calls and aliases, and iframe[srcdoc] content that cannot be safely inspected are rejected. Large binary media remain subject only to the overall archive checks because validation does not load them into memory.

Canonical conversions emit an EPUB plus a per-book <output-stem>.any2book/ directory containing the semantic reader-html/ workspace, manifest.json, an optional preview, and HTML/JSON reports. PDF reports include the preservation gate result and source-span provenance.

PDF fidelity

PDF conversion preserves source wording, numbers, punctuation, repeated headers, page numbers, ornaments, and note text. It performs no spelling correction, inferred deletions, or footnote rewriting. Known .Vn legacy fonts are decoded per span; Unicode spans are retained. Aligned name/role lists preserve cell relationships and whitespace.

Before committing the EPUB, the converter checks ordered text against the source transcription, allowing only NFC equivalence and reflow whitespace, and verifies embedded image occurrence hashes. Navigation labels do not add words to the body. Ambiguous columns, rotated text, overlapping graphics, annotations, forms, or links requiring review stop conversion. Isolated vector graphics are rasterized. This gate verifies conservation of the extracted text layer; it cannot establish that an incorrect PDF text layer matches the printed glyphs. Inspect the source-span provenance and preview for such documents.

AI correction compatibility

The default path is deterministic and uses:

  • Pandoc for structured formats and EPUB rendering
  • PyMuPDF source spans and geometry for PDF reflow, without editorial cleanup
  • Calibre for MOBI when installed

PDF source preservation disables AI text correction, including when old commands pass --ai. No source text is uploaded and no AI patches or checkpoints are applied by this conversion path. Use any2book convert INPUT.pdf --output OUTPUT.epub --ai off.

Development

pnpm install
uv sync
pnpm quality:core
pnpm fixtures:build
npm pack --dry-run

See SKILL.md for the agent workflow.