get macOS app Bundle ID
$ [sudo] pip install mac-app-bundleid
usage: app-bundleid app [value]
$ app-bundleid "Finder"
com.apple.finder
$ app-bundleid /System/Library/CoreServices/Finder.app
com.apple.finder
$ app-bundleid path/to/my-app.app "me.my-app.app"
$ app-bundleid path/to/my-app.app
me.my-app.app