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

sunnah

v1.5.0

Published

Interactive CLI installer and manager for all Sunnah hadith npm + PyPI packages

Readme


🌙 What is Sunnah?

sunnah is an interactive CLI package manager for the major hadith collections of Islam. Install, manage, and update every book in the Sunnah ecosystem from a single terminal command — for both npm (Node.js/React) and pip (Python).

npm install -g sunnah   # Node.js CLI
pip install sunnah      # Python CLI
sunnah                  # open interactive TUI

📦 Available Packages

| Book | npm | pip | Hadiths | CLI | |------|-----|-----|---------|-----| | Sahih al-Bukhari | sahih-al-bukhari | sahih-al-bukhari | 7,563 | bukhari | | Sahih Muslim | sahih-muslim | sahih-muslim | 7,470 | muslim | | Sunan Abi Dawud | sunan-abi-dawud | sunan-abi-dawud | 5,274 | dawud | | Jami al-Tirmidhi | jami-al-tirmidhi | jami-al-tirmidhi | 3,956 | tirmidhi | | Sunan Ibn Majah | sunan-ibn-majah | sunan-ibn-majah | 4,341 | majah | | Sunan al-Nasa'i | sunan-al-nasai | sunan-al-nasai | 5,768 | nasai |


🚀 Installation

# JavaScript / Node.js
npm install -g sunnah

# Python
pip install sunnah

🖥️ Interactive TUI

sunnah

Opens a full-screen terminal UI. Navigate with ↑↓, toggle with space, press enter to install.

════════════════════════════════════════════════════════════
  📿 Sunnah Package Manager  v1.5.0
  ↑↓ nav  space select  a all  i info  u uninstall  U update  enter install  q quit
════════════════════════════════════════════════════════════

  ▶ [✓]  Sahih al-Bukhari   ● npm  (up to date)
         Imam Muhammad ibn Ismail al-Bukhari
         Most authentic hadith collection, second only to the Quran.
         Hadiths: 7,563   CLI: bukhari --help   npm: sahih-al-bukhari   pip: sahih-al-bukhari

    [ ]  Sahih Muslim        ○ not installed
    [ ]  Sunan Abi Dawud     ○ not installed
    ...

Keyboard Controls

| Key | Action | |-----|--------| | | Navigate | | space | Toggle select | | a | Select all / deselect all | | i | Show package info | | u | Uninstall selected | | U | Update selected | | enter | Install selected | | q | Quit |


⚡ Commands

npm packages

sunnah list                          # all packages + npm/pip status
sunnah install bukhari               # npm install -g sahih-al-bukhari
sunnah install bukhari nasai majah   # install multiple at once
sunnah uninstall dawud               # uninstall
sunnah update                        # check for updates
sunnah update --install              # auto-install all updates

Python (pip) packages

sunnah pip install bukhari           # pip install sahih-al-bukhari
sunnah pip install bukhari nasai     # install multiple
sunnah pip uninstall dawud           # uninstall
sunnah pip list                      # show Python package status
sunnah pip update                    # check for pip updates
sunnah pip update --install          # auto-install pip updates

🔍 NEW: Cross-book search

sunnah search "prayer"               # search all installed books (top 3 each)
sunnah search "fasting" --all        # show all results

🎲 NEW: Random hadith

sunnah random                        # random hadith from a random installed book
sunnah random bukhari                # random hadith specifically from Bukhari

ℹ️ NEW: Book info

sunnah info nasai                    # detailed info: versions, CLI, Python import
sunnah info jami-al-tirmidhi         # works with full npm name too

⚛️ React hook generator

sunnah --react                       # generate useSunnah() for all installed books
sunnah --react bukhari muslim        # specific books only

🐍 Python API

After pip install sunnah, you also get the individual book packages:

sunnah pip install bukhari muslim nasai
from sahih_al_bukhari import Bukhari
from sahih_muslim      import Muslim
from sunan_al_nasai    import Nasai

bukhari = Bukhari()
bukhari.get(1)
bukhari.search("prayer", limit=5)
bukhari.getRandom()
bukhari.getByChapter(1)

🟨 JavaScript / Node.js

sunnah install bukhari muslim
import bukhari from 'sahih-al-bukhari';
import muslim  from 'sahih-muslim';

bukhari.get(1).english.text
muslim.search('prayer', 5)

📊 Version Stats

sunnah --version
────────────────────────────────────────────────────────────
  📿 sunnah  v1.5.0
────────────────────────────────────────────────────────────
  Available  : 6
  npm inst.  : 4 / 6
  pip inst.  : 3 / 6
  Collection : Sahih al-Bukhari, Sahih Muslim, Sunan al-Nasa'i, Jami al-Tirmidhi
  Hadiths    : 24,257

🗂️ Monorepo Structure

sunnah/
├── bin/index.js              ← npm CLI (interactive TUI + all commands)
├── python/sunnah_cli/        ← Python CLI (mirrors npm CLI exactly)
│   ├── __init__.py
│   ├── cli.py                ← main Python CLI entry
│   ├── packages.py           ← package registry (single source of truth)
│   ├── npm_utils.py          ← npm helpers
│   └── pip_utils.py          ← pip helpers
├── package.json
├── pyproject.toml
└── .github/workflows/        ← auto-publish to npm + PyPI on release

📄 License

GNU Affero General Public License v3.0 (AGPL-3.0)


Made with ❤️ for the Muslim community · Seeking knowledge together

Stars

📦 npm🐍 PyPI🐛 Issues