Skip to content
Home

Command Line Tool

Since v2025.2, BarCuts comes with an embedded command-line tool to query it for workflows. This is useful if you want to create a custom launcher for BarCuts, or if you want to use its list of active/ global workflows in scripts (see terminology).

The tool returns a JSON object.

Where to find it

Assuming BarCuts is installed in your Applications folder, the tool can be found at

/Applications/BarCuts.app/Contents/MacOS/barcuts-cli

Return value format

The returned data structure is a Javascript object, for example:

{
activeAppID: 'com.mitchellh.ghostty',
activeAppName: 'Ghostty',
activeWorkflows: [
{
fullTitle: 'Workflow 1',
workflowID: '17620440-E9E8-4B5C-9C7A-9B60C24DD428'
}
],
globalWorkflows: [
{
fullTitle: 'Workflow 2',
workflowID: '642957AB-6EDF-4CEA-B1C4-753897F984AA'
},
{
fullTitle: 'Sub menu Workflow 3',
workflowID: 'ADB4BEDC-720B-4DB2-89E3-10D464E7F5D3'
}
]
}

The keys:

  • activeAppID (string) is the bundle ID of the currently active app
  • activeAppName (string) is the name of the currently active app
  • activeWorkflows and globalWorkflows are arrays each containing workflow sets, i.e. objects with both fullTitle and workflowID keys.

These "workflow sets" are sorted alphabetically by fullTitle. If a tagged workflow is configured to show in a sub menu, fullTitle will contain both the name of the sub menu and the workflow title, separated by "≫". workflowID is the UUID which can be used to call the workflow.

But why?

Because scripting is great, automation is great, open formats are great! Because your tools shouldn't restrict you, you should be able to use the data they hold for you however you want.

Fetch the list of active workflows, select one, use the macOS-native /usr/bin/shortcuts CLI command to run it. Easy!

Let me know if you built something cool with it, I would love to see it! If it's a good fit, I might even add a link here. 🤙🏼