There are several ways to access Bunch’s preferences from scripts. The most useful preference to get to is the location of your current Bunch Folder, but you may have cause to check other settings.
You can access various preferences from the command line using
defaults. The following will return the current location of your Bunch files:
defaults read com.brettterpstra.bunch configDir
Getting a list of available bunches is as easy as doing an
ls *.bunch on that folder.
You can also check the “Toggle Bunches” and “Single Bunch Mode” settings:
defaults read com.brettterpstra.bunch toggleBunches defaults read com.brettterpstra.bunch singleBunchMode
You can also use the Bunch CLI to query specific keys.
$ bunch --show-config-key dir /Users/username/bunches $ bunch --show-config-key toggle true
Lastly, you can retrieve some settings via AppleScript:
tell application "Bunch" to get preference "Bunch Folder"