Command-line tool for tracking sunrise, sunset, and day length with IP-based location detection and 10-day projections.
Daylight is a command-line utility that calculates and displays sunrise, sunset, solar noon times, and day length for your current location. The tool automatically determines your location and timezone using IP geolocation, making it work out of the box without manual configuration.
The program displays current day information along with a 10-day projection showing how daylight hours change over time. It handles extreme locations including Arctic and Antarctic regions where standard sunrise/sunset calculations can be complex. Users can override the automatic location detection by specifying custom latitude, longitude, and timezone parameters, enabling offline operation or travel use cases.
Daylight offers multiple output formats including a detailed visual display with ASCII art timelines, a compact short summary mode, and JSON output for programmatic use. The interface adapts to terminal background colors and supports the NO_COLOR environment variable for accessibility. The tool works across Mac, Linux, and Windows platforms and uses the lipgloss library for terminal UI rendering.
# via Homebrew
brew tap jbreckmckye/formulae && brew install daylight
