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

md-bookshelf

v0.1.0

Published

Visualize Markdown prose as famous-book equivalents.

Readme

md-bookshelf

Markdown本文の文字量を、有名な本の「約何冊分」としてターミナルに可視化するCLIです。

インストール

開発中のこのリポジトリからグローバルコマンドとして登録できます。

npm install
npm run build
npm link
md-bookshelf ./notes

npmへ公開後はnpm install -g md-bookshelfまたはnpx md-bookshelf .でも利用できます。

TAB補完

zshでは次を.zshrcへ追加します。

autoload -Uz compinit && compinit
source <(md-bookshelf completion zsh)

bashでは次を.bashrcへ追加します。

source <(md-bookshelf completion bash)

fishでは一度だけ次を実行します。

md-bookshelf completion fish > ~/.config/fish/completions/md-bookshelf.fish

コマンド、主要オプション、出力形式、対象ディレクトリを補完します。

開発環境で使う

npm install
npm run dev -- ./notes
npm run dev -- . --book harry-potter-1-ja --top 5
npm run dev -- . --format json
npm run dev -- books
npm run dev -- books add ./notes --id my-book --title "自分の本" --author "著者" --characters 100000 --language ja
npm run dev -- books add --global --id my-book --title "自分の本" --author "著者" --characters 100000 --language ja

対象ディレクトリの.md-bookshelf/config.jsonにローカル設定を置けます。全ディレクトリ共通の設定は~/.md-bookshelf/config.jsonに置きます。

{
  "bookId": "harry-potter-1-ja",
  "top": 10,
  "exclude": ["archive/**"],
  "includeCode": false,
  "countSpaces": false
}

独自作品はローカルなら<対象>/.md-bookshelf/books.json--global指定時は~/.md-bookshelf/books.jsonへ保存されます。言語はjaenja-JPなどのBCP 47言語タグで指定します。

詳しい集計規則は仕様書を参照してください。