sunnah
One command. Every major Hadith collection.
Interactive package manager for the entire Sunnah ecosystem — npm + PyPI.
🌙 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)
Metadata
Release files for sunnah 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sunnah-1.5.0.tar.gz | 17.0 kB | Without provenance | Details for sunnah-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sunnah-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for sunnah-1.5.0-py3-none-any.whl |
Total release size: 33.8 kB
Release files / sunnah-1.5.0.tar.gz
| Download URL | sunnah-1.5.0.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
afa2ea5655d008a27145f50a624d6e91d7215b36844e135d5b50f6d02a9479f2
|
|
BLAKE2b-256 checksum How to use checksums |
fb3d931c6c01929bbcb84b6b62be415b642a19d1f2baa62dd3429988615a42f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / sunnah-1.5.0-py3-none-any.whl
| Download URL | sunnah-1.5.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a8dee38a8832b0dda20b2bde5c3258f2422c4efd428221a93eaadf542ad735b
|
|
BLAKE2b-256 checksum How to use checksums |
fd3ed2783df67f93b18a1173ad5a7f453810d02d2b77f45d176e3114266bc255
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for sunnah 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.