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

narrarium-astro-reader

v0.1.21

Published

Astro reader and scaffolding CLI for Narrarium book repositories.

Readme

narrarium-astro-reader

Astro reader and reader scaffolding CLI for Narrarium book repositories.

Install

npm install narrarium-astro-reader

Scaffold a reader app

npx narrarium-reader-init reader --book-root ..

Or directly from the published package:

npx narrarium-astro-reader reader --book-root .. --package-name my-book-reader

What the reader includes

  • book landing page plus chapter-by-chapter reading
  • previous, next, and jump chapter navigation
  • reading preferences, bookmark, and continue-reading state stored locally
  • live search across canon, chapters, and scenes
  • character, location, faction, item, secret, and timeline indexes
  • canon mention popups, backlinks, and asset rendering for book, entity, chapter, and scene art
  • automatic EPUB export to public/downloads/book.epub
  • live watcher for book markdown, canon, and assets during npm run dev
  • npm run doctor for broken references, spoiler thresholds, asset metadata, and stale plot.md, resumes/, or state/
  • optional EPUBCheck validation during export or build
  • starter GitHub Pages deployment workflow when scaffolded into a standalone app

Reader modes

The generated reader defaults to a spoiler-safe public mode.

In public mode:

  • secrets stay hidden from the public atlas and nav
  • direct canon pages fall back to teaser or locked views when known_from or reveal_in say a dossier is not safe yet
  • search, canon popups, and backlinks follow the same thresholds

If you want an author-only or spoiler-friendly deployment, enable full canon mode:

NARRARIUM_READER_CANON_MODE=full
# or
NARRARIUM_READER_ALLOW_FULL_CANON=true

Local development

The scaffold creates .env with the computed book root already filled in. Update it if the reader should point somewhere else:

npm install
npm run dev

Typical .env values:

NARRARIUM_BOOK_ROOT=..
# NARRARIUM_READER_CANON_MODE=full
# EPUBCHECK_CMD=epubcheck
# EPUBCHECK_JAR=/absolute/path/to/epubcheck.jar

npm run dev watches the linked book repo, regenerates the EPUB on changes, and triggers a full browser reload. npm run build refreshes the EPUB automatically before Astro builds the site.

Validation and export

npm run doctor
npm run export:epub
npm run build

If EPUBCHECK_CMD or EPUBCHECK_JAR is set, EPUB export and build also run EPUBCheck.

npm run doctor also reports if the linked book repository has stale or missing structured story-state snapshots, so author-facing continuity drift shows up before deployment.

GitHub Pages

You can pass --pages-domain example.com when scaffolding to emit public/CNAME and a Pages workflow already pointed at that domain.