Astral
☀️ Go calculations for the position of the sun and moon.
Install / Use
/learn @sj14/AstralREADME
Astral
Calculations for the position of the sun and moon.
This is a Go port of the Python astral package.
The astral package provides the means to calculate the following times of the sun:
- dawn
- sunrise
- noon
- midnight
- sunset
- dusk
- daylight
- night
- twilight
- blue hour
- golden hour
- ~~rahukaalam~~ TODO
plus solar azimuth and elevation at a specific latitude/longitude. It can also calculate the moon phase for a specific date.
CLI
Besides the package for usage in you own programs, we also provide a tool for showing the data.

Installation
Homebrew
brew install sj14/tap/astral
Manually
go get -u github.com/sj14/astral/cmd/astral
Usage
Usage of astral:
-elev float
elevation of the observer
-lat float
latitude of the observer
-long float
longitude of the observer
-time string
day/time used for the calculation (defaults to current time)
Example
$ astral -lat 51.58 -long 6.52
Date/Time Fri Apr 30 21:12:11 CEST 2021
Latitude 51.58
Longitude 6.52
Elevation 0
Daylight 14h48m11s
Night-Time 9h9m55s
Moon Phase Full Moon (17.611222222222224)
Apr 30 03:39 (-17:32) Dawn (Astronomical)
Apr 30 04:39 (-16:32) Dawn (Nautical)
Apr 30 05:28 (-15:43) Dawn (Civil) Twilight Start Blue Hour Start
Apr 30 05:43 (-15:28) Golden Hour Start Blue Hour End
Apr 30 06:07 (-15:04) Sunrise Twilight End
Apr 30 06:53 (-14:18) Golden Hour End
Apr 30 13:31 (-07:41) Noon
Apr 30 20:09 (-01:02) Golden Hour Start
Apr 30 20:55 (-00:16) Sunset Twilight Start
┈┈┈┈┈┈ 21:12 ┈┈┈┈┈┈┈┈ ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
Apr 30 21:19 (+00:07) Golden Hour End Blue Hour Start
Apr 30 21:34 (+00:22) Dusk (Civil) Twilight End Blue Hour End
Apr 30 22:24 (+01:12) Dusk (Nautical)
Apr 30 23:25 (+02:13) Dusk (Astronomical)
May 1 01:31 (+04:18) Midnight
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
xurl
344.4kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).

