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"'
org.hammerspoon.Hammerspoon

Another option is to use lsappinfo:

$ lsappinfo info -only bundleid "Hammerspoon"
"CFBundleIdentifier"="org.hammerspoon.Hammerspoon"

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

Comments

Leave a Reply