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

@pimlabs/stilus

v2.0.0

Published

CLI for manuscript QA — inspect, clean, compare, chunk

Readme

@pimlabs/stilus

CLI for manuscript QA — inspect, clean, compare, and chunk Markdown manuscripts.

Installation

# Run without installing
bunx @pimlabs/stilus <command>

# Install globally
bun install -g @pimlabs/stilus
# or
npm install -g @pimlabs/stilus

Requires: Bun ≥ 1.0

Typical Workflow

stilus inspect manuscript.md                      # 1. QA check
stilus clean manuscript.md                        # 2. fix → manuscript-clean.md
stilus compare manuscript.md manuscript-clean.md  # 3. verify changes
stilus chunk manuscript-clean.md                  # 4. split → manuscript-clean-chunks/

Commands

inspect — analyze a manuscript

stilus inspect <file> [--profile <name|path>] [--strict] [--json]

Runs QA analysis: word/line counts, broken lines, ghost headings, citations, missing sections.

stilus inspect manuscript.md
stilus inspect manuscript.md --profile english-book --json

Exit code 1 if severity is error.


clean — fix broken lines and normalize formatting

stilus clean <file> [output] [--profile <name|path>] [--strict] [--dry-run] [--json]

Merges broken lines, normalizes punctuation and em-dashes. Output defaults to <file>-clean.md in the same directory.

stilus clean draft.md                  # → draft-clean.md
stilus clean draft.md revised.md       # explicit output
stilus clean draft.md --dry-run        # preview only, no files written

Also writes <output>.manifest.json with full before/after report.


compare — diff two manuscript versions

stilus compare <before> <after> [--profile <name|path>] [--strict] [--json]

Shows word, character, heading, citation, and broken-line deltas.

stilus compare manuscript.md manuscript-clean.md

chunk — split manuscript into per-chapter files

stilus chunk <file> [output-dir] [--profile <name|path>]

Splits by chapter headings, one .md file per chapter. Output dir defaults to <file>-chunks/ in the same directory.

stilus chunk manuscript.md            # → manuscript-chunks/
stilus chunk manuscript.md ./chapters/  # explicit dir

profile — manage profiles

stilus profile [list]                          List available profiles
stilus profile init <name> [output]            Scaffold new profile JSON
stilus profile validate <path>                 Validate a profile file
stilus profile                                 # list profiles
stilus profile list --json
stilus profile init my-novel                   # → my-novel.json
stilus profile init my-novel profiles/my.json  # explicit path
stilus profile init my-novel --extends default
stilus profile validate ./my-novel.json
stilus profile --help                          # profile-specific help

Profiles

Built-in profiles: default, english-book, indonesian-book.

--profile accepts a built-in name or a path to a .json file:

stilus inspect manuscript.md --profile english-book
stilus inspect manuscript.md --profile ./my-profile.json

Custom profile minimum (extending a built-in):

{
  "extends": "indonesian-book",
  "name": "my-author",
  "word_delta_threshold": 150,
  "required_sections": ["DAFTAR ISI", "LAMPIRAN"]
}

See PROFILES.md for the full field reference.


Flags

| Flag | Commands | Description | |------|----------|-------------| | --profile <name\|path> | inspect, clean, compare, chunk | Profile to use | | --strict | inspect, clean, compare | Treat warnings as errors | | --dry-run | clean | Analyze without writing files | | --json | inspect, clean, compare, profile list | Output raw JSON | | --extends <name> | profile init | Profile to extend |


Exit Codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | Error (QA severity = error, or runtime exception) | | 2 | Bad arguments |


Also available as MCP

For use with Claude, see @pimlabs/stilus-mcp.