Skip to content

CLI to check Sehar and Iftar times in Ramadan anywhere in the world.

Notifications You must be signed in to change notification settings

bilalkhan360/ramadan-cli-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ramadan-cli (Rust)

Rust implementation of the ramadan-cli project.

What it does

  • Shows Sehar (Fajr) and Iftar (Maghrib) timings.
  • Supports today view, full Ramadan month, and specific roza number.
  • Uses saved config (city/country/coords/method/school/timezone).
  • Falls back to IP geolocation and city geocoding.
  • Supports JSON mode for automation.
  • Supports custom first roza date override.

Install

Build and run from source:

cargo run -- --help
cargo run -- "San Francisco"

Install locally (adds binaries to ~/.cargo/bin):

cargo install --path .
ramadan-cli --help
roza --help

CLI surface

ramadan-cli [city] [options]
ramadan-cli reset
ramadan-cli config [options]

Aliases (same CLI behavior):

  • roza
  • ramzan
  • ramazan
  • ramadan

Main options

-c, --city <city>
-a, --all
-n, --number <1-30>
-p, --plain
-j, --json
--first-roza-date <YYYY-MM-DD>
--clear-first-roza-date
-v, --version

Config options

ramadan-cli config --city "San Francisco" --country "United States" --method 2 --school 0 --timezone "America/Los_Angeles"
ramadan-cli config --show
ramadan-cli config --clear

JSON error contract

On failures with --json, stderr emits:

{"ok":false,"error":{"code":"...","message":"..."}}

Development

cargo fmt
cargo test

Notes

  • Config directory can be overridden with RAMADAN_CLI_CONFIG_DIR.
  • In JSON mode, data is printed to stdout and structured errors to stderr.

See RELEASE_CHECKLIST.md before tagging/publishing.

About

CLI to check Sehar and Iftar times in Ramadan anywhere in the world.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages