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

@fs/mycroft

v0.4.1

Published

Command-line tool that ingests EPUB files, builds a local searchable index, and answers questions using a retrieval-augmented workflow.

Readme

mycroft

Command-line tool that ingests EPUB files, builds a local searchable index, and answers questions using a retrieval-augmented workflow.

Requirements

  • Node.js >= 18

Install

npm install -g @fs/mycroft

Ensure node is on your PATH (the CLI uses Node.js as its runtime).

Usage

Run mycroft config onboard first to set everything up, then use the book and chat commands.

mycroft book list
mycroft book ingest /path/to/book.epub
mycroft book ingest /path/to/book.epub --summary
mycroft book ingest /path/to/book.epub --batch
mycroft book ingest /path/to/book.epub --batch --summary
mycroft book ingest status <id>
mycroft book ingest resume <id>
mycroft book ask <id> "What is the main conflict?"
mycroft chat start <id>
mycroft chat ask <session> "What does this foreshadow?"
mycroft chat repl <session>
mycroft config init
mycroft config resolve
mycroft config onboard

Cost estimates (approximate)

These are rough, model-dependent estimates for embeddings + optional summaries. Costs vary by model pricing and book structure. Use this as a directional guide only. Summarization estimates assume gpt-5-nano and embeddings assume text-embedding-3-small.

| Book size | Example | No summaries | With summaries | With summaries (batched) | | --- | --- | --- | --- | --- | | Small | 200-300 pages | ~$0.002-$0.004 | ~$0.04-$0.08 | ~$0.02-$0.04 | | Average novel | 350-450 pages | ~$0.004-$0.006 | ~$0.08-$0.15 | ~$0.04-$0.08 | | Large novel | 600-800 pages | ~$0.007-$0.01 | ~$0.15-$0.25 | ~$0.08-$0.13 | | Trilogy | 1,500-2,000 pages | ~$0.02-$0.03 | ~$0.30-$0.60 | ~$0.15-$0.30 |

Reference point: a ~700 page book (~1,600 chunks) is about ~$0.008 for embeddings only, ~$0.20 with summaries, or ~$0.10 with summaries batched.

Use --summary to generate per-chapter summaries during ingestion. Summaries improve retrieval quality but are significantly more expensive than embeddings alone (see cost table above). Without --summary, ingestion only generates embeddings, which is fast and cheap.

Use --batch to cut costs by 50% via the OpenAI Batch API. This applies to both embeddings and summaries. Batch jobs may take up to 24 hours to complete. When using --batch, the command returns immediately after submitting the job. When combined with --summary, the summary batch runs first; once complete, run resume to submit the embedding batch. Use mycroft book ingest status <id> to check progress, and mycroft book ingest resume <id> to advance to the next phase. If a non-batch ingest is interrupted, use the same resume command to continue without re-embedding completed chunks.

Local dev

npm install
npm run build
node dist/cli.js --help

Config

Default config path:

~/.config/mycroft/config.json

Default config:

{
  "dataDir": "~/.local/share/mycroft",
  "askEnabled": true,
  "models": {
    "embedding": "text-embedding-3-small",
    "summary": "gpt-5-nano",
    "chat": "gpt-5.1"
  }
}

Environment overrides:

  • MYCROFT_DATA_DIR
  • MYCROFT_CONFIG
  • OPENAI_API_KEY

OPENAI_API_KEY is required for embeddings, search, and Q&A (and for summaries if enabled).

CLI overrides:

  • --data-dir <path> (global)
  • --max-chapter <n>
  • --top-k <n>
  • --manual (interactive chapter selection)
  • --batch
  • --summary
  • --force