# ramadan-cli (Rust)
Rust implementation of the [ramadan-cli](https://github.com/ahmadawais/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:
```bash
cargo run -- --help
cargo run -- "San Francisco"
```
Install locally (adds binaries to `~/.cargo/bin`):
```bash
cargo install --path .
ramadan-cli --help
roza --help
```
## CLI surface
```bash
ramadan-cli [city] [options]
ramadan-cli reset
ramadan-cli config [options]
```
Aliases (same CLI behavior):
- `roza`
- `ramzan`
- `ramazan`
- `ramadan`
## Main options
```bash
-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
```bash
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:
```json
{"ok":false,"error":{"code":"...","message":"..."}}
```
## Development
```bash
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.