Overview
Ramadan CLI saves your configuration to avoid re-entering location and prayer settings every time. Configuration includes:- Location: City, country, latitude, longitude
- Prayer Settings: Calculation method, juristic school, timezone
- Custom Overrides: First roza date (optional)
First-Run Setup
When you run the CLI for the first time in a terminal (TTY), you’ll see an interactive setup:Interactive Setup Flow
The setup uses Clack prompts to guide you through configuration:-
Location Detection
- Automatically detects your location via IP geolocation
- Shows detected city and country
- Asks for confirmation
- Allows manual entry if auto-detection fails
-
Calculation Method
- Recommends a method based on your country
- Shows available methods (0-23)
- You can accept recommendation or choose manually
-
Juristic School
- Recommends school based on your country
- Options: Shafi (0) or Hanafi (1)
- Affects Asr prayer time calculation
-
Timezone
- Auto-detects timezone from location
- Can be manually set if needed
- Ensures accurate countdown times
Auto-Detection
The CLI uses multiple IP geolocation providers with fallbacks:When Interactive Setup Runs
- Runs
- Skips
Interactive setup runs when:
- First time using the CLI
- After
roza reset - After
roza config --clear - Running in a TTY (terminal)
- No saved configuration exists
Passing a city as an argument temporarily bypasses your saved config for that run only.
Non-Interactive Configuration
Use theconfig command to manage settings without prompts.
Setting Configuration
Viewing Configuration
Updating Specific Settings
Update individual settings while keeping others:Clearing Configuration
Configuration Options
Location Settings
City name for prayer time calculationExamples:
"San Francisco""Lahore""Vancouver"
Country name for prayer time calculationExamples:
"United States""Pakistan""Canada"
Geographic latitude (-90 to 90)Examples:
37.7749(San Francisco)31.5497(Lahore)49.2827(Vancouver)
Geographic longitude (-180 to 180)Examples:
-122.4194(San Francisco)74.3436(Lahore)-123.1207(Vancouver)
Prayer Calculation Settings
Calculation method ID (0-23)Determines how Fajr and Isha times are calculated. Each Islamic organization uses different angles.Common Methods:
0- Shia Ithna-Ashari1- University of Islamic Sciences, Karachi2- Islamic Society of North America (ISNA)3- Muslim World League4- Umm Al-Qura University, Makkah5- Egyptian General Authority of Survey15- Institute of Geophysics, University of Tehran
Juristic school for Asr calculation (0 or 1)Values:
0- Shafi, Maliki, Hanbali, Jafari (standard)1- Hanafi (earlier Asr time)
IANA timezone identifierEnsures accurate countdowns and times for your location.Examples:
America/Los_AngelesAmerica/New_YorkAsia/KarachiAsia/DubaiEurope/LondonAmerica/Vancouver
Custom First Roza Date
By default, Ramadan CLI uses the Hijri calendar from the Aladhan API to determine Ramadan dates. You can override this with a custom first roza date.Setting Custom Date
Clearing Custom Date
Revert to API-provided Ramadan dates:Date Format
Must use ISO 8601 date format:2026-02-192026-03-012027-02-08
19-02-2026❌02/19/2026❌2026/02/19❌
Use Cases
- Local Moonsighting
- Different Calendar
- Testing
Your local community starts Ramadan based on local moonsighting:
How It Works
When a custom first roza date is set:- Roza 1 = Your specified date
- Roza 2 = Your specified date + 1 day
- Roza 3 = Your specified date + 2 days
- … and so on for all 30 days
Country-Aware Recommendations
Ramadan CLI automatically recommends calculation methods and schools based on your country.How Recommendations Work
- Detects country is Pakistan
- Recommends method 1 (University of Islamic Sciences, Karachi)
- Recommends school 1 (Hanafi)
- Auto-applies recommendations if using default settings
When Recommendations Apply
- Auto-Applied
- Not Applied
Recommendations auto-apply when:
- Using default/unset method or school
- First-run interactive setup
- No explicit config override
Configuration Precedence
Ramadan CLI resolves configuration in this order (highest to lowest priority):-
Command-line arguments/flags
-
Saved configuration
-
Auto-detected location
-
Interactive setup (if TTY available)
-
Error (if all else fails)
Examples
Configuration Storage
Configuration is stored in a local file on your system.Default Location
- macOS/Linux:
~/.config/ramadan-cli/config.json - Windows:
%APPDATA%\ramadan-cli\config.json
Custom Storage Location
Override the storage directory:- Testing with isolated configs
- Multiple user profiles
- Agent skill packages
- CI/CD environments
What’s Stored
The config file contains:The config file is created automatically. You don’t need to create or edit it manually.