Skip to main content

Main Command Flags

Flags for the main ramadan-cli command (showing Sehar/Iftar timings).

City Selection

string
Positional argument for city name (one-off lookup)Type: stringDefault: Uses saved configuration or auto-detectsBehavior: Does not overwrite saved configuration. Only affects current run.Examples:
City Aliases:
  • sfSan Francisco
string
Flag alternative for specifying cityType: stringDefault: NoneBehavior: Same as positional city argumentExamples:

Display Modes

boolean
default:false
Show complete Ramadan month (all 30 days)Type: booleanDefault: falseExamples:
Output: Table with all 30 roza days showing Sehar, Iftar, dates, and Hijri dates
Cannot be used with --number. Choose one display mode.
number
Show specific roza day (1-30)Type: number (integer)Range: 1 to 30Default: None (shows today by default)Validation: Must be an integer between 1 and 30, or you’ll get: Roza number must be between 1 and 30.Examples:
Cannot be used with --all. Choose one display mode.

Output Formats

boolean
default:false
Plain text output without ASCII bannerType: booleanDefault: false (shows decorative banner)Behavior: Replaces ASCII art banner with simple “RAMADAN CLI” textExamples:
Use Cases:
  • Cleaner terminal output
  • Logging to files
  • Screen readers
boolean
default:false
JSON-only structured outputType: booleanDefault: falseBehavior:
  • Outputs structured JSON to stdout (success) or stderr (error)
  • Skips interactive setup prompts
  • Disables spinner and decorative output
Success Output:
Error Output (stderr):
Error Codes:
  • INVALID_FIRST_ROZA_DATE - Invalid date format
  • INVALID_FLAG_COMBINATION - Used --all and --number together
  • PRAYER_TIMES_FETCH_FAILED - API fetch error
  • RAMADAN_CALENDAR_FETCH_FAILED - Calendar fetch error
  • LOCATION_DETECTION_FAILED - Could not detect location
  • ROZA_NOT_FOUND - Invalid roza number
  • RAMADAN_CLI_ERROR - Generic error
  • UNKNOWN_ERROR - Unknown error
Examples:
Use Cases:
  • Scripts and automation
  • CI/CD pipelines
  • Parsing with jq
  • Integration with other tools
boolean
default:false
Status line output (next event only)Type: booleanDefault: falseBehavior:
  • Outputs single line with next event and countdown
  • Silently fails on error (no output)
  • Skips interactive setup
  • Perfect for status bars
Output Examples:
Use Cases:
  • tmux status bar
  • i3 status bar
  • waybar
  • Coding agents
  • Shell prompts
Examples:
tmux Example:
i3blocks Example:

Custom Date Override

string
Set and use a custom first roza dateType: string (ISO 8601 date)Format: YYYY-MM-DDDefault: Uses API-provided Ramadan date from Hijri calendarBehavior:
  • Persists across runs (saved to config)
  • Overrides API Hijri calendar
  • Calculates all 30 roza days from this start date
Validation: Must be valid ISO 8601 date or you’ll get: Invalid first roza date. Use YYYY-MM-DD.Examples:
Use Cases:
  • Local moonsighting differs from API
  • Following specific country’s calendar
  • Testing with specific dates
boolean
default:false
Clear custom first roza date and use API Ramadan dateType: booleanDefault: falseBehavior:
  • Removes saved custom first roza date
  • Reverts to API-provided Hijri calendar
  • Takes precedence over --first-roza-date if both provided
Examples:
Use Cases:
  • Return to standard API dates
  • Remove test date override

Version and Help

boolean
Display version numberType: booleanOutput: Version string only to stdoutExamples:
Output:
boolean
Display help informationType: booleanOutput: Usage information and available flagsExamples:

Config Command Flags

Flags for the ramadan-cli config command (managing configuration).

Location Configuration

string
Save city name to configurationType: stringBehavior: Merges with existing config (doesn’t clear other values)Examples:
string
Save country name to configurationType: stringBehavior: Merges with existing configExamples:
number
Save latitude coordinate (-90 to 90)Type: numberRange: -90 to 90Validation: Must be between -90 and 90 or you’ll get: Invalid latitude.Examples:
number
Save longitude coordinate (-180 to 180)Type: numberRange: -180 to 180Validation: Must be between -180 and 180 or you’ll get: Invalid longitude.Examples:

Prayer Settings Configuration

number
Save calculation method (0-23)Type: number (integer)Range: 0 to 23Validation: Must be integer from 0 to 23 or you’ll get: Invalid method.Common Values:
  • 0 - Shia Ithna-Ashari
  • 1 - University of Islamic Sciences, Karachi
  • 2 - Islamic Society of North America (ISNA)
  • 3 - Muslim World League
  • 4 - Umm Al-Qura University, Makkah
  • 5 - Egyptian General Authority of Survey
  • 15 - Institute of Geophysics, University of Tehran
See Aladhan API Methods for complete list.Examples:
number
Save juristic school (0=Shafi, 1=Hanafi)Type: number (integer)Range: 0 or 1Validation: Must be 0 or 1 or you’ll get: Invalid school.Values:
  • 0 - Shafi, Maliki, Hanbali, Jafari (standard Asr time)
  • 1 - Hanafi (earlier Asr time)
Examples:
string
Save timezone identifierType: string (IANA timezone)Format: IANA timezone identifier (e.g., America/Los_Angeles)Common Values:
  • America/Los_Angeles
  • America/New_York
  • America/Chicago
  • America/Vancouver
  • Asia/Karachi
  • Asia/Dubai
  • Europe/London
Examples:

Config Actions

boolean
default:false
Display current configurationType: booleanDefault: falseOutput:
Examples:
boolean
default:false
Clear all saved configurationType: booleanDefault: falseBehavior: Removes all saved settings (location, method, school, timezone, first roza date)Output:
Examples:
Equivalent to roza reset

Flag Combinations and Conflicts

Invalid Combinations

Cannot use together: --all and --numberThese flags are mutually exclusive. You must choose one display mode.
Error: Use either --all or --number, not both.

Flag Precedence

Both positional argument and flag can specify city:
If both provided, flag takes precedence:

Compatible Combinations


Flag Reference Tables

Main Command Flags

Config Command Flags


Environment Variables

string
Override configuration directoryType: string (directory path)Default:
  • macOS/Linux: ~/.config/ramadan-cli
  • Windows: %APPDATA%\ramadan-cli
Examples:
Use Cases:
  • Testing with isolated configs
  • Multiple user profiles
  • CI/CD environments
  • Agent skill packages

Examples by Use Case

Personal Daily Use

Travelers

Status Bars

Scripts and Automation

CI/CD Pipelines

Testing Different Dates

Multiple Locations


Next Steps

Basic Usage

Learn common usage patterns

Configuration

Understand configuration management