Álvaro Ramírez
Getting macOS app bundle ID
From stack overflow:
Option 1
osascript -e 'id of app "Emacs"'
Option 2
mdls -name kMDItemCFBundleIdentifier -r SomeApp.app
From stack overflow:
Option 1
osascript -e 'id of app "Emacs"'
Option 2
mdls -name kMDItemCFBundleIdentifier -r SomeApp.app