sunnah 1.4.0 โ 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +258 -398
- package/bin/index.js +1022 -1604
- package/books/jami-al-tirmidhi/README.md +201 -0
- package/books/jami-al-tirmidhi/bin/index.js +165 -0
- package/books/jami-al-tirmidhi/examples/express/server.js +7 -0
- package/books/jami-al-tirmidhi/examples/node-commonjs/example.js +7 -0
- package/books/jami-al-tirmidhi/examples/node-esm/example.mjs +6 -0
- package/books/jami-al-tirmidhi/examples/react/HadithExample.jsx +17 -0
- package/books/jami-al-tirmidhi/package.json +58 -0
- package/books/jami-al-tirmidhi/src/index.cjs +52 -0
- package/books/jami-al-tirmidhi/src/index.js +35 -0
- package/books/jami-al-tirmidhi/src/index.node.js +18 -0
- package/books/jami-al-tirmidhi/types/index.d.ts +28 -0
- package/books/sahih-al-bukhari/README.md +551 -0
- package/books/sahih-al-bukhari/bin/index.js +306 -0
- package/books/sahih-al-bukhari/data/bukhari.json.gz +0 -0
- package/books/sahih-al-bukhari/examples/express/server.js +49 -0
- package/books/sahih-al-bukhari/examples/node-commonjs/example.js +21 -0
- package/books/sahih-al-bukhari/examples/node-esm/example.mjs +24 -0
- package/books/sahih-al-bukhari/examples/react/HadithExample.jsx +73 -0
- package/books/sahih-al-bukhari/package.json +54 -0
- package/books/sahih-al-bukhari/src/index.cjs +55 -0
- package/books/sahih-al-bukhari/src/index.js +35 -0
- package/books/sahih-al-bukhari/src/index.node.js +21 -0
- package/books/sahih-al-bukhari/types/index.d.ts +35 -0
- package/books/sahih-muslim/LICENSE +661 -0
- package/books/sahih-muslim/README.md +547 -0
- package/books/sahih-muslim/bin/index.js +183 -0
- package/books/sahih-muslim/data/muslim.json.gz +0 -0
- package/books/sahih-muslim/examples/express/server.js +16 -0
- package/books/sahih-muslim/examples/node-commonjs/example.js +11 -0
- package/books/sahih-muslim/examples/node-esm/example.mjs +9 -0
- package/books/sahih-muslim/examples/react/HadithExample.jsx +28 -0
- package/books/sahih-muslim/package.json +58 -0
- package/books/sahih-muslim/src/index.cjs +52 -0
- package/books/sahih-muslim/src/index.js +35 -0
- package/books/sahih-muslim/src/index.node.js +18 -0
- package/books/sahih-muslim/types/index.d.ts +28 -0
- package/books/sunan-abi-dawud/LICENSE +661 -0
- package/books/sunan-abi-dawud/README.md +149 -0
- package/books/sunan-abi-dawud/bin/index.js +183 -0
- package/books/sunan-abi-dawud/data/dawud.json.gz +0 -0
- package/books/sunan-abi-dawud/examples/express/server.js +7 -0
- package/books/sunan-abi-dawud/examples/node-commonjs/example.js +7 -0
- package/books/sunan-abi-dawud/examples/node-esm/example.mjs +6 -0
- package/books/sunan-abi-dawud/examples/react/HadithExample.jsx +17 -0
- package/books/sunan-abi-dawud/package.json +58 -0
- package/books/sunan-abi-dawud/src/index.cjs +52 -0
- package/books/sunan-abi-dawud/src/index.js +35 -0
- package/books/sunan-abi-dawud/src/index.node.js +18 -0
- package/books/sunan-abi-dawud/types/index.d.ts +28 -0
- package/books/sunan-ibn-majah/README.md +198 -0
- package/books/sunan-ibn-majah/bin/index.js +138 -0
- package/books/sunan-ibn-majah/examples/express/server.js +8 -0
- package/books/sunan-ibn-majah/examples/node-commonjs/example.js +7 -0
- package/books/sunan-ibn-majah/examples/node-esm/example.mjs +6 -0
- package/books/sunan-ibn-majah/examples/react/HadithExample.jsx +17 -0
- package/books/sunan-ibn-majah/package.json +58 -0
- package/books/sunan-ibn-majah/src/index.cjs +52 -0
- package/books/sunan-ibn-majah/src/index.js +35 -0
- package/books/sunan-ibn-majah/src/index.node.js +18 -0
- package/books/sunan-ibn-majah/types/index.d.ts +28 -0
- package/package.json +39 -27
- /package/{LICENSE โ books/sahih-al-bukhari/LICENSE} +0 -0
package/README.md
CHANGED
|
@@ -1,398 +1,258 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
<h1
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
#
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
โโโ index.d.ts โ TypeScript definitions
|
|
260
|
-
โโโ package.json
|
|
261
|
-
โโโ README.md
|
|
262
|
-
โโโ LICENSE โ AGPL-3.0
|
|
263
|
-
โโโ .gitignore
|
|
264
|
-
โโโ .npmignore
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
The `package.json` must follow this shape exactly:
|
|
268
|
-
|
|
269
|
-
```json
|
|
270
|
-
{
|
|
271
|
-
"name": "<book-slug>",
|
|
272
|
-
"version": "1.0.0",
|
|
273
|
-
"description": "Complete <Book Name> hadith collection. Tiny package (~3KB), data from CDN. CLI + Node.js + React/Vue/Vite.",
|
|
274
|
-
"type": "module",
|
|
275
|
-
"main": "./index.cjs",
|
|
276
|
-
"module": "./index.browser.js",
|
|
277
|
-
"types": "./index.d.ts",
|
|
278
|
-
"exports": {
|
|
279
|
-
".": {
|
|
280
|
-
"types": "./index.d.ts",
|
|
281
|
-
"browser": "./index.browser.js",
|
|
282
|
-
"require": "./index.cjs",
|
|
283
|
-
"import": "./index.node.js"
|
|
284
|
-
},
|
|
285
|
-
"./chapters/*": "./chapters/*"
|
|
286
|
-
},
|
|
287
|
-
"bin": { "<cmd>": "./bin/index.js" },
|
|
288
|
-
"scripts": {
|
|
289
|
-
"build": "node build.mjs",
|
|
290
|
-
"prepublishOnly": "node build.mjs"
|
|
291
|
-
},
|
|
292
|
-
"keywords": [
|
|
293
|
-
"islam",
|
|
294
|
-
"hadith",
|
|
295
|
-
"<slug>",
|
|
296
|
-
"sunnah",
|
|
297
|
-
"json",
|
|
298
|
-
"arabic",
|
|
299
|
-
"english",
|
|
300
|
-
"react",
|
|
301
|
-
"hook"
|
|
302
|
-
],
|
|
303
|
-
"author": "muhammadsaadamin",
|
|
304
|
-
"license": "AGPL-3.0",
|
|
305
|
-
"repository": {
|
|
306
|
-
"type": "git",
|
|
307
|
-
"url": "https://github.com/SENODROOM/<book-slug>.git"
|
|
308
|
-
},
|
|
309
|
-
"files": [
|
|
310
|
-
"index.js",
|
|
311
|
-
"index.browser.js",
|
|
312
|
-
"index.cjs",
|
|
313
|
-
"index.node.js",
|
|
314
|
-
"index.d.ts",
|
|
315
|
-
"bin/index.js",
|
|
316
|
-
"bin/<slug>.json",
|
|
317
|
-
"chapters/"
|
|
318
|
-
],
|
|
319
|
-
"engines": { "node": ">=14.0.0" }
|
|
320
|
-
}
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
**2. Publish the npm package**
|
|
324
|
-
|
|
325
|
-
```bash
|
|
326
|
-
cd <book-slug>
|
|
327
|
-
npm publish --access public
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
**3. Fork this monorepo and add the subtree**
|
|
331
|
-
|
|
332
|
-
```bash
|
|
333
|
-
git clone https://github.com/<your-username>/sunnah.git
|
|
334
|
-
cd sunnah
|
|
335
|
-
git remote add <book-slug> https://github.com/<your-username>/<book-slug>.git
|
|
336
|
-
git subtree add --prefix=books/<book-slug> <book-slug> main --squash
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
**4. Register the new package in `bin/index.js`**
|
|
340
|
-
|
|
341
|
-
Add an entry to the `PACKAGES` array in `bin/index.js`:
|
|
342
|
-
|
|
343
|
-
```js
|
|
344
|
-
{
|
|
345
|
-
name: "<book-slug>",
|
|
346
|
-
label: "<Book Name>",
|
|
347
|
-
author: "Imam <Author Name>",
|
|
348
|
-
desc: "<One-sentence description of the collection.>",
|
|
349
|
-
hadiths: "<count>",
|
|
350
|
-
cmd: "<cmd>",
|
|
351
|
-
hook: "use<Hook>",
|
|
352
|
-
},
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
**5. Open a Pull Request**
|
|
356
|
-
|
|
357
|
-
Push your branch and open a PR to `SENODROOM/sunnah` with:
|
|
358
|
-
|
|
359
|
-
- Title: `feat: add <book-slug> package`
|
|
360
|
-
- Description: Include the npm package link, hadith count, and a short description of the book's authenticity/provenance
|
|
361
|
-
|
|
362
|
-
---
|
|
363
|
-
|
|
364
|
-
### ๐ Reporting Issues
|
|
365
|
-
|
|
366
|
-
Use the [Issues tab](https://github.com/SENODROOM/sunnah/issues) to:
|
|
367
|
-
|
|
368
|
-
- Request a new hadith collection to be added
|
|
369
|
-
- Report data errors in any book
|
|
370
|
-
- Suggest CLI improvements
|
|
371
|
-
|
|
372
|
-
---
|
|
373
|
-
|
|
374
|
-
## ๐ License
|
|
375
|
-
|
|
376
|
-
Licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** โ see [LICENSE](LICENSE) for details.
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
|
-
## ๐ Acknowledgments
|
|
381
|
-
|
|
382
|
-
- **๐ Sources** โ The authentic hadith collections of Islam
|
|
383
|
-
- **๐จโ๐ซ Scholars** โ Translators and Islamic scholars whose work makes this possible
|
|
384
|
-
- **๐ Community** โ The Muslim developer community worldwide
|
|
385
|
-
|
|
386
|
-
---
|
|
387
|
-
|
|
388
|
-
<div align="center">
|
|
389
|
-
|
|
390
|
-
**Made with โค๏ธ for the Muslim community | Seeking knowledge together**
|
|
391
|
-
|
|
392
|
-
[](https://github.com/SENODROOM/sunnah)
|
|
393
|
-
|
|
394
|
-
[๐ฆ npm](https://npmjs.com/package/sunnah) โข
|
|
395
|
-
[๐ Issues](https://github.com/SENODROOM/sunnah/issues) โข
|
|
396
|
-
[๐ค Contribute](https://github.com/SENODROOM/sunnah/pulls)
|
|
397
|
-
|
|
398
|
-
</div>
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1>
|
|
4
|
+
<img src="https://em-content.zobj.net/source/apple/391/prayer-beads_1f4ff.png" width="36" />
|
|
5
|
+
sunnah
|
|
6
|
+
</h1>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<strong>One command. Every major Hadith collection.<br />
|
|
10
|
+
Interactive package manager for the entire Sunnah ecosystem โ npm + PyPI.</strong>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<br />
|
|
14
|
+
|
|
15
|
+
<p>
|
|
16
|
+
<a href="https://www.npmjs.com/package/sunnah">
|
|
17
|
+
<img src="https://img.shields.io/npm/v/sunnah?style=for-the-badge&logo=npm&logoColor=white&color=CB3837&labelColor=1a1a1a" />
|
|
18
|
+
</a>
|
|
19
|
+
|
|
20
|
+
<a href="https://pypi.org/project/sunnah/">
|
|
21
|
+
<img src="https://img.shields.io/pypi/v/sunnah?style=for-the-badge&logo=pypi&logoColor=white&color=3775A9&labelColor=1a1a1a" />
|
|
22
|
+
</a>
|
|
23
|
+
|
|
24
|
+
<a href="https://github.com/SENODROOM/sunnah/blob/main/LICENSE">
|
|
25
|
+
<img src="https://img.shields.io/github/license/SENODROOM/sunnah?style=for-the-badge&logo=gnu&logoColor=white&color=A42E2B&labelColor=1a1a1a" />
|
|
26
|
+
</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<p>
|
|
30
|
+
<img src="https://img.shields.io/badge/Node.js-%3E%3D18-339933?style=for-the-badge&logo=node.js&logoColor=white&labelColor=1a1a1a" />
|
|
31
|
+
|
|
32
|
+
<img src="https://img.shields.io/badge/Python-%3E%3D3.8-3776AB?style=for-the-badge&logo=python&logoColor=white&labelColor=1a1a1a" />
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## ๐ What is Sunnah?
|
|
40
|
+
|
|
41
|
+
`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).
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install -g sunnah # Node.js CLI
|
|
45
|
+
pip install sunnah # Python CLI
|
|
46
|
+
sunnah # open interactive TUI
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## ๐ฆ Available Packages
|
|
52
|
+
|
|
53
|
+
| Book | npm | pip | Hadiths | CLI |
|
|
54
|
+
|------|-----|-----|---------|-----|
|
|
55
|
+
| **Sahih al-Bukhari** | `sahih-al-bukhari` | `sahih-al-bukhari` | 7,563 | `bukhari` |
|
|
56
|
+
| **Sahih Muslim** | `sahih-muslim` | `sahih-muslim` | 7,470 | `muslim` |
|
|
57
|
+
| **Sunan Abi Dawud** | `sunan-abi-dawud` | `sunan-abi-dawud` | 5,274 | `dawud` |
|
|
58
|
+
| **Jami al-Tirmidhi** | `jami-al-tirmidhi` | `jami-al-tirmidhi` | 3,956 | `tirmidhi` |
|
|
59
|
+
| **Sunan Ibn Majah** | `sunan-ibn-majah` | `sunan-ibn-majah` | 4,341 | `majah` |
|
|
60
|
+
| **Sunan al-Nasa'i** | `sunan-al-nasai` | `sunan-al-nasai` | 5,768 | `nasai` |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## ๐ Installation
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# JavaScript / Node.js
|
|
68
|
+
npm install -g sunnah
|
|
69
|
+
|
|
70
|
+
# Python
|
|
71
|
+
pip install sunnah
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## ๐ฅ๏ธ Interactive TUI
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
sunnah
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Opens a full-screen terminal UI. Navigate with `โโ`, toggle with `space`, press `enter` to install.
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
86
|
+
๐ฟ Sunnah Package Manager v1.5.0
|
|
87
|
+
โโ nav space select a all i info u uninstall U update enter install q quit
|
|
88
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
89
|
+
|
|
90
|
+
โถ [โ] Sahih al-Bukhari โ npm (up to date)
|
|
91
|
+
Imam Muhammad ibn Ismail al-Bukhari
|
|
92
|
+
Most authentic hadith collection, second only to the Quran.
|
|
93
|
+
Hadiths: 7,563 CLI: bukhari --help npm: sahih-al-bukhari pip: sahih-al-bukhari
|
|
94
|
+
|
|
95
|
+
[ ] Sahih Muslim โ not installed
|
|
96
|
+
[ ] Sunan Abi Dawud โ not installed
|
|
97
|
+
...
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Keyboard Controls
|
|
101
|
+
|
|
102
|
+
| Key | Action |
|
|
103
|
+
|-----|--------|
|
|
104
|
+
| `โ` `โ` | Navigate |
|
|
105
|
+
| `space` | Toggle select |
|
|
106
|
+
| `a` | Select all / deselect all |
|
|
107
|
+
| `i` | Show package info |
|
|
108
|
+
| `u` | Uninstall selected |
|
|
109
|
+
| `U` | Update selected |
|
|
110
|
+
| `enter` | Install selected |
|
|
111
|
+
| `q` | Quit |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## โก Commands
|
|
116
|
+
|
|
117
|
+
### npm packages
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
sunnah list # all packages + npm/pip status
|
|
121
|
+
sunnah install bukhari # npm install -g sahih-al-bukhari
|
|
122
|
+
sunnah install bukhari nasai majah # install multiple at once
|
|
123
|
+
sunnah uninstall dawud # uninstall
|
|
124
|
+
sunnah update # check for updates
|
|
125
|
+
sunnah update --install # auto-install all updates
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Python (pip) packages
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
sunnah pip install bukhari # pip install sahih-al-bukhari
|
|
132
|
+
sunnah pip install bukhari nasai # install multiple
|
|
133
|
+
sunnah pip uninstall dawud # uninstall
|
|
134
|
+
sunnah pip list # show Python package status
|
|
135
|
+
sunnah pip update # check for pip updates
|
|
136
|
+
sunnah pip update --install # auto-install pip updates
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### ๐ NEW: Cross-book search
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
sunnah search "prayer" # search all installed books (top 3 each)
|
|
143
|
+
sunnah search "fasting" --all # show all results
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### ๐ฒ NEW: Random hadith
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
sunnah random # random hadith from a random installed book
|
|
150
|
+
sunnah random bukhari # random hadith specifically from Bukhari
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### โน๏ธ NEW: Book info
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
sunnah info nasai # detailed info: versions, CLI, Python import
|
|
157
|
+
sunnah info jami-al-tirmidhi # works with full npm name too
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### โ๏ธ React hook generator
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
sunnah --react # generate useSunnah() for all installed books
|
|
164
|
+
sunnah --react bukhari muslim # specific books only
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## ๐ Python API
|
|
170
|
+
|
|
171
|
+
After `pip install sunnah`, you also get the individual book packages:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
sunnah pip install bukhari muslim nasai
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from sahih_al_bukhari import Bukhari
|
|
179
|
+
from sahih_muslim import Muslim
|
|
180
|
+
from sunan_al_nasai import Nasai
|
|
181
|
+
|
|
182
|
+
bukhari = Bukhari()
|
|
183
|
+
bukhari.get(1)
|
|
184
|
+
bukhari.search("prayer", limit=5)
|
|
185
|
+
bukhari.getRandom()
|
|
186
|
+
bukhari.getByChapter(1)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## ๐จ JavaScript / Node.js
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
sunnah install bukhari muslim
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
```javascript
|
|
198
|
+
import bukhari from 'sahih-al-bukhari';
|
|
199
|
+
import muslim from 'sahih-muslim';
|
|
200
|
+
|
|
201
|
+
bukhari.get(1).english.text
|
|
202
|
+
muslim.search('prayer', 5)
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## ๐ Version Stats
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
sunnah --version
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
215
|
+
๐ฟ sunnah v1.5.0
|
|
216
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
217
|
+
Available : 6
|
|
218
|
+
npm inst. : 4 / 6
|
|
219
|
+
pip inst. : 3 / 6
|
|
220
|
+
Collection : Sahih al-Bukhari, Sahih Muslim, Sunan al-Nasa'i, Jami al-Tirmidhi
|
|
221
|
+
Hadiths : 24,257
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## ๐๏ธ Monorepo Structure
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
sunnah/
|
|
230
|
+
โโโ bin/index.js โ npm CLI (interactive TUI + all commands)
|
|
231
|
+
โโโ python/sunnah_cli/ โ Python CLI (mirrors npm CLI exactly)
|
|
232
|
+
โ โโโ __init__.py
|
|
233
|
+
โ โโโ cli.py โ main Python CLI entry
|
|
234
|
+
โ โโโ packages.py โ package registry (single source of truth)
|
|
235
|
+
โ โโโ npm_utils.py โ npm helpers
|
|
236
|
+
โ โโโ pip_utils.py โ pip helpers
|
|
237
|
+
โโโ package.json
|
|
238
|
+
โโโ pyproject.toml
|
|
239
|
+
โโโ .github/workflows/ โ auto-publish to npm + PyPI on release
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## ๐ License
|
|
245
|
+
|
|
246
|
+
GNU Affero General Public License v3.0 (AGPL-3.0)
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
<div align="center">
|
|
251
|
+
|
|
252
|
+
**Made with โค๏ธ for the Muslim community ยท Seeking knowledge together**
|
|
253
|
+
|
|
254
|
+
[](https://github.com/SENODROOM/sunnah)
|
|
255
|
+
|
|
256
|
+
[๐ฆ npm](https://npmjs.com/package/sunnah) โข [๐ PyPI](https://pypi.org/project/sunnah/) โข [๐ Issues](https://github.com/SENODROOM/sunnah/issues)
|
|
257
|
+
|
|
258
|
+
</div>
|