sunnah 1.1.4 β 1.2.1
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.
Potentially problematic release.
This version of sunnah might be problematic. Click here for more details.
- package/README.md +158 -111
- package/bin/index.js +978 -204
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
<h1>πΏ Sunnah</h1>
|
|
4
4
|
|
|
5
|
-

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
8
10
|

|
|
9
11
|
|
|
10
|
-
**π One
|
|
12
|
+
**π One command. Every major Hadith collection. Interactive CLI installer for the entire Sunnah ecosystem.**
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
[](https://nodei.co/npm/sunnah/)
|
|
13
15
|
|
|
14
16
|
</div>
|
|
15
17
|
|
|
@@ -17,166 +19,210 @@ _Coming soon to npm_
|
|
|
17
19
|
|
|
18
20
|
## π What is Sunnah?
|
|
19
21
|
|
|
20
|
-
`sunnah` is an
|
|
22
|
+
`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 UI β with real-time progress bars, keyboard navigation, and zero config.
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g sunnah
|
|
26
|
+
sunnah
|
|
27
|
+
```
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| Book | Author | Hadiths | Status |
|
|
27
|
-
| --------------------- | --------------- | ------- | --------------------------------------------------------------------------------- |
|
|
28
|
-
| **Sahih al-Bukhari** | Imam al-Bukhari | 7,277 | β
Available ([sahih-al-bukhari](https://www.npmjs.com/package/sahih-al-bukhari)) |
|
|
29
|
-
| **Sahih Muslim** | Imam Muslim | 7,563 | π Coming Soon |
|
|
30
|
-
| **Sunan Abu Dawud** | Abu Dawud | 5,274 | π Coming Soon |
|
|
31
|
-
| **Jami at-Tirmidhi** | Imam Tirmidhi | 3,956 | π Coming Soon |
|
|
32
|
-
| **Sunan an-Nasa'i** | Imam an-Nasa'i | 5,758 | π Coming Soon |
|
|
33
|
-
| **Sunan Ibn Majah** | Ibn Majah | 4,341 | π Coming Soon |
|
|
34
|
-
| **Muwatta Malik** | Imam Malik | 1,832 | π Coming Soon |
|
|
35
|
-
| **Musnad Ahmad** | Imam Ahmad | 27,000+ | π Coming Soon |
|
|
36
|
-
| **Riyad as-Salihin** | Imam an-Nawawi | 1,896 | π Coming Soon |
|
|
37
|
-
| **Al-Adab Al-Mufrad** | Imam al-Bukhari | 1,322 | π Coming Soon |
|
|
29
|
+
That's it. A beautiful full-screen terminal UI opens, showing every available hadith package β select what you want, press enter, watch it install.
|
|
38
30
|
|
|
39
31
|
---
|
|
40
32
|
|
|
41
|
-
##
|
|
33
|
+
## π¦ Available Packages
|
|
42
34
|
|
|
43
|
-
|
|
35
|
+
| Book | Package | Hadiths | Author | CLI Command |
|
|
36
|
+
| -------------------- | ---------------------------------------------------------------- | ------- | ---------------- | ----------- |
|
|
37
|
+
| **Sahih al-Bukhari** | [`sahih-al-bukhari`](https://npmjs.com/package/sahih-al-bukhari) | 7,563 | Imam al-Bukhari | `bukhari` |
|
|
38
|
+
| **Sahih Muslim** | [`sahih-muslim`](https://npmjs.com/package/sahih-muslim) | 7,470 | Imam Muslim | `muslim` |
|
|
39
|
+
| **Sunan Abi Dawud** | [`sunan-abi-dawud`](https://npmjs.com/package/sunan-abi-dawud) | 5,274 | Imam Abu Dawud | `dawud` |
|
|
40
|
+
| **Jami al-Tirmidhi** | [`jami-al-tirmidhi`](https://npmjs.com/package/jami-al-tirmidhi) | 3,956 | Imam al-Tirmidhi | `tirmidhi` |
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
# Install the full package
|
|
47
|
-
npm install sunnah
|
|
42
|
+
---
|
|
48
43
|
|
|
49
|
-
|
|
44
|
+
## π Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
50
47
|
npm install -g sunnah
|
|
51
48
|
```
|
|
52
49
|
|
|
53
|
-
|
|
50
|
+
---
|
|
54
51
|
|
|
55
|
-
|
|
56
|
-
# Download a hadith book
|
|
57
|
-
sunnah download bukhari
|
|
58
|
-
sunnah download muslim
|
|
59
|
-
sunnah download tirmidhi
|
|
52
|
+
## π₯οΈ Usage
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
sunnah bukhari 1
|
|
63
|
-
sunnah muslim 2345 --arabic
|
|
64
|
-
sunnah tirmidhi 23 34 --both
|
|
54
|
+
### Interactive UI (default)
|
|
65
55
|
|
|
66
|
-
|
|
67
|
-
sunnah
|
|
56
|
+
```bash
|
|
57
|
+
sunnah
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Opens a full-screen interactive installer:
|
|
68
61
|
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
```
|
|
63
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
64
|
+
π Sunnah Package Manager v1.1.2
|
|
65
|
+
ββ navigate space select a all i info u uninstall enter install q quit
|
|
66
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
67
|
+
|
|
68
|
+
βΆ [β] Sahih al-Bukhari β installed
|
|
69
|
+
Imam Muhammad ibn Ismail al-Bukhari
|
|
70
|
+
The most authentic collection of hadith...
|
|
71
|
+
Hadiths: 7,563 CLI: bukhari --help
|
|
72
|
+
|
|
73
|
+
[ ] Sahih Muslim β not installed
|
|
74
|
+
[ ] Sunan Abi Dawud β not installed
|
|
75
|
+
[ ] Jami al-Tirmidhi β not installed
|
|
76
|
+
|
|
77
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
78
|
+
β 1 selected: sahih-al-bukhari
|
|
79
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
71
80
|
```
|
|
72
81
|
|
|
73
|
-
###
|
|
82
|
+
### Keyboard Controls
|
|
74
83
|
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
| Key | Action |
|
|
85
|
+
| ------- | ------------------------------------- |
|
|
86
|
+
| `β` `β` | Navigate packages |
|
|
87
|
+
| `space` | Toggle select |
|
|
88
|
+
| `a` | Select all / deselect all |
|
|
89
|
+
| `i` | Show package info + installed version |
|
|
90
|
+
| `u` | Uninstall selected |
|
|
91
|
+
| `enter` | Install selected |
|
|
92
|
+
| `q` | Quit |
|
|
77
93
|
|
|
78
|
-
|
|
79
|
-
console.log(bukhari.get(1));
|
|
80
|
-
console.log(muslim.search("prayer"));
|
|
81
|
-
console.log(tirmidhi.getRandom());
|
|
82
|
-
console.log(tirmidhi.getByChapter(3));
|
|
94
|
+
### Non-interactive commands
|
|
83
95
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
sunnah
|
|
87
|
-
sunnah
|
|
96
|
+
```bash
|
|
97
|
+
sunnah --list # List all packages with install status
|
|
98
|
+
sunnah --update # Check all installed packages for updates
|
|
99
|
+
sunnah --help # Show help
|
|
100
|
+
sunnah --version # Show version
|
|
88
101
|
```
|
|
89
102
|
|
|
90
|
-
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## πΊ Install Flow
|
|
106
|
+
|
|
107
|
+
When you press `enter`, each package installs with a live animated progress bar:
|
|
91
108
|
|
|
92
|
-
```bash
|
|
93
|
-
# Inside your React project
|
|
94
|
-
sunnah --react
|
|
95
109
|
```
|
|
110
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
111
|
+
Installing 2 packagesβ¦
|
|
112
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
113
|
+
|
|
114
|
+
[1/2] Sahih al-Bukhari
|
|
115
|
+
npm install -g sahih-al-bukhari
|
|
116
|
+
|
|
117
|
+
ββββββββββββββββββββββββββββββββββββββββ 50% Downloading tarballβ¦
|
|
96
118
|
|
|
97
|
-
|
|
119
|
+
β Sahih al-Bukhari installed
|
|
120
|
+
Usage: bukhari --help
|
|
98
121
|
|
|
99
|
-
|
|
100
|
-
|
|
122
|
+
[2/2] Jami al-Tirmidhi
|
|
123
|
+
npm install -g jami-al-tirmidhi
|
|
101
124
|
|
|
102
|
-
|
|
103
|
-
const bukhari = useBukhari();
|
|
104
|
-
const muslim = useMuslim();
|
|
125
|
+
ββββββββββββββββββββββββββββββββββββββββ 100% Complete!
|
|
105
126
|
|
|
106
|
-
|
|
127
|
+
β Jami al-Tirmidhi installed
|
|
128
|
+
Usage: tirmidhi --help
|
|
107
129
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
130
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
131
|
+
β All done! 2 packages installed globally.
|
|
132
|
+
|
|
133
|
+
βΈ bukhari --help Β· Sahih al-Bukhari
|
|
134
|
+
βΈ tirmidhi --help Β· Jami al-Tirmidhi
|
|
135
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
115
136
|
```
|
|
116
137
|
|
|
117
138
|
---
|
|
118
139
|
|
|
119
|
-
##
|
|
140
|
+
## π --list
|
|
120
141
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
```bash
|
|
143
|
+
sunnah --list
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
148
|
+
Available Sunnah Packages
|
|
149
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
150
|
+
|
|
151
|
+
Sahih al-Bukhari β installed
|
|
152
|
+
npm install -g sahih-al-bukhari
|
|
153
|
+
The most authentic collection of hadith...
|
|
154
|
+
Hadiths: 7,563 Author: Imam Muhammad ibn Ismail al-Bukhari
|
|
155
|
+
|
|
156
|
+
Sahih Muslim β not installed
|
|
157
|
+
npm install -g sahih-muslim
|
|
158
|
+
...
|
|
159
|
+
```
|
|
130
160
|
|
|
131
161
|
---
|
|
132
162
|
|
|
133
|
-
##
|
|
163
|
+
## π --update
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
sunnah --update
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Checks every installed package against the latest version on npm:
|
|
134
170
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
171
|
+
```
|
|
172
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
173
|
+
Checking for updatesβ¦
|
|
174
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
175
|
+
|
|
176
|
+
β Sahih al-Bukhari 1.2.0 β up to date
|
|
177
|
+
β Jami al-Tirmidhi 1.0.1 β 1.1.0 (run: npm install -g jami-al-tirmidhi)
|
|
178
|
+
```
|
|
141
179
|
|
|
142
180
|
---
|
|
143
181
|
|
|
144
|
-
##
|
|
182
|
+
## ποΈ After Installing
|
|
145
183
|
|
|
146
|
-
|
|
184
|
+
Once you've installed individual packages via `sunnah`, each has its own powerful CLI:
|
|
147
185
|
|
|
148
186
|
```bash
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
187
|
+
# Read hadiths
|
|
188
|
+
bukhari 1 # First hadith
|
|
189
|
+
muslim 2345 -b # Hadith #2345 in Arabic + English
|
|
190
|
+
tirmidhi 23 34 # 34th hadith of chapter 23
|
|
191
|
+
dawud --random # Random hadith
|
|
192
|
+
|
|
193
|
+
# Search
|
|
194
|
+
bukhari --search "prayer" # Top 5 results with highlighted matches
|
|
195
|
+
tirmidhi --search "fasting" --all # All results
|
|
152
196
|
|
|
153
|
-
|
|
197
|
+
# Browse chapters
|
|
198
|
+
muslim --chapter 5 # All hadiths in chapter 5
|
|
154
199
|
|
|
155
|
-
|
|
200
|
+
# React hook
|
|
201
|
+
bukhari --react # Generate useBukhari() hook in your project
|
|
202
|
+
```
|
|
156
203
|
|
|
157
204
|
---
|
|
158
205
|
|
|
159
|
-
##
|
|
206
|
+
## π Individual Package Links
|
|
160
207
|
|
|
161
|
-
|
|
208
|
+
Each book is also available as a standalone package with full Node.js, React, and Vue support:
|
|
162
209
|
|
|
163
|
-
|
|
164
|
-
|
|
210
|
+
| Package | npm | GitHub |
|
|
211
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- |
|
|
212
|
+
| `sahih-al-bukhari` | [](https://npmjs.com/package/sahih-al-bukhari) | [SENODROOM/sahih-al-bukhari](https://github.com/SENODROOM/sahih-al-bukhari) |
|
|
213
|
+
| `sahih-muslim` | [](https://npmjs.com/package/sahih-muslim) | [SENODROOM/sahih-muslim](https://github.com/SENODROOM/sahih-muslim) |
|
|
214
|
+
| `sunan-abi-dawud` | [](https://npmjs.com/package/sunan-abi-dawud) | [SENODROOM/sunan-abi-dawud](https://github.com/SENODROOM/sunan-abi-dawud) |
|
|
215
|
+
| `jami-al-tirmidhi` | [](https://npmjs.com/package/jami-al-tirmidhi) | [SENODROOM/jami-al-tirmidhi](https://github.com/SENODROOM/jami-al-tirmidhi) |
|
|
165
216
|
|
|
166
217
|
---
|
|
167
218
|
|
|
168
219
|
## π€ Contributing
|
|
169
220
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- π **Data** β Help format and verify hadith collections
|
|
173
|
-
- π» **Code** β Build the package infrastructure
|
|
174
|
-
- π **Docs** β Write documentation and examples
|
|
175
|
-
- π **Issues** β Report bugs or suggest features
|
|
221
|
+
Contributions are welcome!
|
|
176
222
|
|
|
177
223
|
1. Fork the repository
|
|
178
|
-
2. Create a branch: `git checkout -b feature/
|
|
179
|
-
3. Commit: `git commit -m 'Add
|
|
224
|
+
2. Create a branch: `git checkout -b feature/my-feature`
|
|
225
|
+
3. Commit: `git commit -m 'Add my feature'`
|
|
180
226
|
4. Push and open a Pull Request
|
|
181
227
|
|
|
182
228
|
---
|
|
@@ -199,9 +245,10 @@ Licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** β see
|
|
|
199
245
|
|
|
200
246
|
**Made with β€οΈ for the Muslim community | Seeking knowledge together**
|
|
201
247
|
|
|
202
|
-
[
|
|
203
|
-
|
|
204
|
-
[
|
|
205
|
-
[
|
|
248
|
+
[](https://github.com/SENODROOM/sunnah)
|
|
249
|
+
|
|
250
|
+
[π¦ npm](https://npmjs.com/package/sunnah) β’
|
|
251
|
+
[π Issues](https://github.com/SENODROOM/sunnah/issues) β’
|
|
252
|
+
[π€ Contribute](https://github.com/SENODROOM/sunnah/pulls)
|
|
206
253
|
|
|
207
254
|
</div>
|