sunnah 1.3.6
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/README.md +254 -0
- package/bin/index.js +1604 -0
- package/package.json +27 -0
package/README.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<h1>πΏ Sunnah</h1>
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
**π One command. Every major Hadith collection. Interactive CLI installer for the entire Sunnah ecosystem.**
|
|
13
|
+
|
|
14
|
+
[](https://nodei.co/npm/sunnah/)
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## π What is Sunnah?
|
|
21
|
+
|
|
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.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g sunnah
|
|
26
|
+
sunnah
|
|
27
|
+
```
|
|
28
|
+
|
|
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.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## π¦ Available Packages
|
|
34
|
+
|
|
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` |
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## π Installation
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g sunnah
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## π₯οΈ Usage
|
|
53
|
+
|
|
54
|
+
### Interactive UI (default)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
sunnah
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Opens a full-screen interactive installer:
|
|
61
|
+
|
|
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
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Keyboard Controls
|
|
83
|
+
|
|
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 |
|
|
93
|
+
|
|
94
|
+
### Non-interactive commands
|
|
95
|
+
|
|
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
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## πΊ Install Flow
|
|
106
|
+
|
|
107
|
+
When you press `enter`, each package installs with a live animated progress bar:
|
|
108
|
+
|
|
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β¦
|
|
118
|
+
|
|
119
|
+
β Sahih al-Bukhari installed
|
|
120
|
+
Usage: bukhari --help
|
|
121
|
+
|
|
122
|
+
[2/2] Jami al-Tirmidhi
|
|
123
|
+
npm install -g jami-al-tirmidhi
|
|
124
|
+
|
|
125
|
+
ββββββββββββββββββββββββββββββββββββββββ 100% Complete!
|
|
126
|
+
|
|
127
|
+
β Jami al-Tirmidhi installed
|
|
128
|
+
Usage: tirmidhi --help
|
|
129
|
+
|
|
130
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
131
|
+
β All done! 2 packages installed globally.
|
|
132
|
+
|
|
133
|
+
βΈ bukhari --help Β· Sahih al-Bukhari
|
|
134
|
+
βΈ tirmidhi --help Β· Jami al-Tirmidhi
|
|
135
|
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## π --list
|
|
141
|
+
|
|
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
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## π --update
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
sunnah --update
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Checks every installed package against the latest version on npm:
|
|
170
|
+
|
|
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
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## ποΈ After Installing
|
|
183
|
+
|
|
184
|
+
Once you've installed individual packages via `sunnah`, each has its own powerful CLI:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
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
|
|
196
|
+
|
|
197
|
+
# Browse chapters
|
|
198
|
+
muslim --chapter 5 # All hadiths in chapter 5
|
|
199
|
+
|
|
200
|
+
# React hook
|
|
201
|
+
bukhari --react # Generate useBukhari() hook in your project
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## π Individual Package Links
|
|
207
|
+
|
|
208
|
+
Each book is also available as a standalone package with full Node.js, React, and Vue support:
|
|
209
|
+
|
|
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) |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## π€ Contributing
|
|
220
|
+
|
|
221
|
+
Contributions are welcome!
|
|
222
|
+
|
|
223
|
+
1. Fork the repository
|
|
224
|
+
2. Create a branch: `git checkout -b feature/my-feature`
|
|
225
|
+
3. Commit: `git commit -m 'Add my feature'`
|
|
226
|
+
4. Push and open a Pull Request
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## π License
|
|
231
|
+
|
|
232
|
+
Licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0)** β see [LICENSE](LICENSE) for details.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## π Acknowledgments
|
|
237
|
+
|
|
238
|
+
- **π Sources** β The authentic hadith collections of Islam
|
|
239
|
+
- **π¨βπ« Scholars** β Translators and Islamic scholars whose work makes this possible
|
|
240
|
+
- **π Community** β The Muslim developer community worldwide
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
<div align="center">
|
|
245
|
+
|
|
246
|
+
**Made with β€οΈ for the Muslim community | Seeking knowledge together**
|
|
247
|
+
|
|
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)
|
|
253
|
+
|
|
254
|
+
</div>
|