ruby comes preinstalled on macos. so if you want to script a mac without installers or non oob software, it’s that or perl or bash or appkescript.