Skip to content

Examples

Daily workflow

  1. Run rainlog to open the TUI.
  2. Press n to log today's gauge reading (e.g. 6.2 mm).
  3. Press to scroll back and review recent history.

Log a reading for a past date

  1. Press n to open the Add Rain modal.
  2. Change the date field to the target date (e.g. 2025-05-01).
  3. Enter the amount and press Ctrl+S.

Back-fill dry days

If you have been away and want to fill a gap with zeros back to the previous record:

  1. Press n.
  2. Enter the date and amount for the most recent day.
  3. Toggle Back-fill zeros on.
  4. Press Ctrl+S — zeros are inserted for every missing day between this date and the previous logged record.

Correct a mistake

  1. Press g until grouping shows Daily.
  2. Press s to enter bar-select mode.
  3. Use / to highlight the incorrect day.
  4. Press e — the edit modal pre-fills the date and current amount.
  5. Update the amount and press Ctrl+S.

Explore soil moisture

Press m to switch to soil-moisture index mode. The chart shows a decaying moving sum — higher values mean the soil has received recent rain. Use g to compare trends at weekly or monthly resolution.

Use a different database directory

rainlog --db-dir ~/weather-data

All reads and writes go to ~/weather-data/rainlog.sqlite.