Skip to content

grandiser/salah

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salah

And establish prayer at the two ends of the day and at the approach of the night. Indeed, good deeds do away with misdeeds. That is a reminder for those who remember. - Quran 11:114

Minimal, customizable, and neofetch-like Prayer Times CLI, written in Go


image

Features

  • Automatic location detection
  • Accurate daily prayer times
  • English/Arabic Support
  • No API keys or personal data required
  • Hijri and Gregorian date support
  • Compact mode for minimal output

Installation

Build from Source

Linux/macOS:

git clone github.com/grandiser/salah.git
cd salah
go build -o salah
sudo mv salah /usr/local/bin/

Windows:

git clone https://github.com/grandiser/salah.git
cd salah
go build -o salah.exe
move salah.exe C:/Windows/System32/salah.exe

Via Go Install

go install github.com/grandiser/salah@latest

Pre-built Binaries

  1. Download the binary for your platform from the Releases page

  2. Linux/macOS: Make executable and install:

chmod +x salah-linux-amd64
sudo mv salah-linux-amd64 /usr/local/bin/salah
  1. Windows: Move to a directory in your PATH or run directly:
# Run directly
./salah-windows-amd64.exe

# Or move to PATH directory
move salah-windows-amd64.exe C:\Windows\System32\salah.exe

Usage

# Default (auto-detect location)
salah

# Specify city and country
salah --city "Casablanca" --country "Morocco"

# Compact output
salah --compact

# Show help
salah --help

Command-line Options

  • --city <name>: Specify city for prayer times
  • --country <name>: Specify country (must be used with --city)
  • --compact: Compact display mode
  • --help: Show help message

Configuration

A config file is created at ~/.config/salah/salah.toml (Linux/macOS) or %AppData%/salah/salah.toml (Windows) on first run:

  • city: Default city
  • country: Default country
  • calculationMethod: Calculation method ID or shorthand (API reference)
  • compact: Compact output
  • useArabic: Use Arabic for Dates and Prayer Names
  • hijriDate: Show Hijri date
  • locateByIp: Use IP-based location

Display Examples

macOS Linux Mint
image image
image image

How It Works

  1. IP Detection and Geolocation: Gets your public IP address using ip-api.com
  2. Prayer Times: Fetches prayer times from AlAdhan API
  3. Display: Shows formatted prayer times in your terminal

License

MIT License — see LICENSE for details.

Acknowledgements

  • AlAdhan API for providing accurate and reliable prayer times data
  • IP-API for providing free and accurate geolocation data
  • Inspired by stormy, a minimal, neofetch-like weather CLI