Islamic prayer times CLI with automatic location detection
npm install azaan
> Islamic prayer times CLI with automatic location detection


Just run azaan β it handles the rest:
- Auto-detects your location via IP (3 fallback providers)
- Auto-recommends calculation method based on your country
- Auto-detects timezone for accurate prayer times
- Auto-highlights current and next prayer with countdown
No configuration needed. Just run and pray.
``bash
npx azaan
Usage
`bash
Show today's prayer times (auto-setup on first run)
azaanShow next prayer with countdown
azaan nextShow Qibla direction
azaan qiblaShow monthly calendar
azaan monthJSON output for scripting
azaan --jsonSingle line for status bars (tmux, polybar, waybar)
azaan --statusList calculation methods
azaan methodsConfigure settings
azaan config
`Output
`
AZAAN - Prayer Times CLI π San Francisco, USA
π America/Los_Angeles
π
01 Feb 2026
π 13 ShaΚΏbΔn 1447 AH
π
Fajr 5:59 AM
βοΈ Sunrise 7:14 AM
π Dhuhr 12:23 PM
π€οΈ Asr 3:12 PM β current
π Maghrib 5:34 PM β next in 24m
π Isha 6:48 PM
`Commands
| Command | Description |
|---------|-------------|
|
azaan | Today's prayer times |
| azaan next | Next prayer with countdown |
| azaan qibla | Qibla direction from your location |
| azaan month | Monthly prayer calendar |
| azaan methods | List calculation methods |
| azaan config | Configure settings |
| azaan --reset | Reset all settings |Options
`
-v, --version Show version
-h, --help Show help
-c, --city Override city
-C, --country Override country
--lat Override latitude
--lon Override longitude
-p, --plain Plain text (no colors/emojis)
-j, --json JSON output
-s, --status Single line status
--reset Reset settings
`JSON Output
`bash
azaan --json
``json
{
"location": {
"city": "San Francisco",
"country": "USA",
"timezone": "America/Los_Angeles"
},
"date": {
"gregorian": "01 Feb 2026",
"hijri": "13 ShaΚΏbΔn 1447"
},
"timings": {
"fajr": "05:59",
"sunrise": "07:14",
"dhuhr": "12:23",
"asr": "15:12",
"maghrib": "17:34",
"isha": "18:48"
},
"current": "asr",
"next": {
"prayer": "maghrib",
"time": "17:34",
"remaining": "24m"
}
}
`Status Bar
`bash
azaan --status
Maghrib 5:34 PM (24m)
`Use in tmux, polybar, waybar, or any status bar.
Qibla Direction
`bash
azaan qibla
``
π Qibla Direction β‘οΈ 118.42Β° (ESE)
From: 37.7749, -122.4194
Direction is degrees clockwise from North
`Configuration
`bash
Interactive setup
azaan configSet location
azaan config --city "Makkah" --country "Saudi Arabia"Set calculation method
azaan config --method 4Set school (0=Shafi, 1=Hanafi)
azaan config --school 1Use 24-hour format
azaan config --24hShow current config
azaan config --showClear config
azaan config --clear
`Calculation Methods
| ID | Method | Region |
|----|--------|--------|
| 0 | Jafari | Shia |
| 1 | Karachi | Pakistan |
| 2 | ISNA | North America |
| 3 | MWL | Europe |
| 4 | Makkah | Saudi Arabia |
| 5 | Egypt | Egypt |
| 7 | Tehran | Iran |
| 15 | Moonsighting | Worldwide |
| 16 | Dubai | UAE |
Run
azaan methods for full list of 23 methods.Features
Zero-config:
- Auto-detects location via IP (3 fallback providers)
- Auto-recommends calculation method for your country
- Auto-detects timezone
Smart display:
- Highlights current prayer
- Shows next prayer with countdown
- Displays Hijri date
Flexible output:
- JSON output for scripting (
--json)
- Status bar mode for tmux/polybar (--status)
- Plain text mode (--plain)Comprehensive:
- 23 calculation methods worldwide
- Qibla direction from your location
- Monthly prayer calendar
- Interactive setup wizard
Aliases
After installing globally, all these aliases work:
-
azaan
- athan
- azan`Powered by Aladhan Prayer Times API
MIT