Get Java package name and bundle id of a Mac app

Use the osascript command to get a package bundle id name of a Mac app:

$ osascript -e 'id of app "Hammerspoon"'

Another option is to use lsappinfo:

$ lsappinfo info -only bundleid "Hammerspoon"

The Java package name or bundle id of Hammerspoon is org.hammerspoon.Hammerspoon.


Leave a Reply