Batch convert heic to jpg in macOS command line

Install ImageMagick with brew
Then use magick for batch conversion directly in the command line

brew install imagemagick

for file in *.HEIC; do magick "$file" "${file%.HEIC}.jpg"; done