🍇 Alfred Workflow for Working with the Bunch app

Hi everyone :wave:

Background on My Use of Bunch

Over the course of the last three weeks I have been getting to grips with the app Bunch by @ttscoff. I have looked at it several times before and figured I could and should be using it, but it didn’t quite fit some of my way of working. This was more a constraint of my practices than a shortfall in the app. Over time I have been making small changes to some of my workflow processes and approaches to get to the point where I could make good use of Bunch rather than it just being a side-utility as it would have been if I had shoe-horned it into my practices previously. I could see the potential and I wanted to give myself the best chance of success with it.

I drive a lot of my manual automation triggers through three apps - Better Touch Tool (BTT), Keyboard Maestro (KM), and Alfred. There is some overlap in places (and a lot of cross-interaction), but broadly speaking, BTT drives my Stream Deck and mouse, Keyboard Maestro manages my custom hot keys, and Alfred is my “anything” launcher. It was therefore natural to see if I could drive my Bunch interactions from Alfred.

I started off with the Bunch workflow for Alfred created by @kjaymiller, but there were things I found myself wanting to do that it didn’t cater for. I have created a number of Alfred workflows in the past, and so I decided to take a look at creating an Alfred workflow for my own needs.

A New Alfred Workflow for Bunch and a Request to Test

As it grew, I started spotting more opportunities for features and thinking of additional things others might want to do if they had access to it. I do try and share more broadly where I can as it is then a better return on my time investment if more people can benefit from it. That brings me to where things currently stand.

I am still a relatively inexperienced Bunch user, and Bunch has the potential for a lot of sophistication in terms of configuration and use. I am positive that after less than a month of sporadic use in my personal time that I have a long way to go before I feel I fully understand its features and potential. To that end, I am looking for some help from the community with my Alfred workflow.

Below I have shared a link to Cluster, my Alfred workflow for bunch. This can be considered a test release (a beta) where I am looking for help finding the flaws and omissions that no doubt exist in the workflow. I haven’t started on the associated documentation just yet, but I have included some links below to an outline of the functionality. The workflow will not be “finished” until it is documented, but that can run in parallel to testing and fixing.

I would like to invite any Alfred / Bunch users to download the workflow and give it a try. Then to post back on this thread with any errors, suggestions, typos, etc. The idea is to get some community input to help me get it to the point where it is suitable to be classed as a 1.0.0 release.

To give everyone a sense of what the workflow looks like in this first 0.1.0 release and the breadth of interaction it currently offers, here is a screenshot of the flows from Alfred’s workflow builder page.

Thanks in advance to anyone who can spare a little time to look this over and provide feedback. It is much appreciated, and hopefully you will get the benefit of a useful new workflow out the other end.


Download

You can now download the latest release of the Cluster workflow from cluster.thoughtasylum.com.

3 Likes

I’m self inexperienced Bunch user. Set up a few bunches in the past, but have barely used them. Glad to see you in the process of creating your own workflow. Thank you, Stephen!

1 Like

I’ve downloaded and installed it and already prefer it for launching and closing bunches.

One question, is it possible to change the trigger from “bbx” to “cbx” (for cluster - bunch), as “bb” is associated with BBEdit in my mind.

I’m not all that familiar with Alfred Workflows, so if this is something I could do myself just point me in the right direction and I’ll take it from there.

Thank you for sharing.

1 Like

@MevetS, yes. All of the keyword triggers can be found in the workflow configuration settings for the workflow. Just over type the bbx with cbx in those settings.

You can blank out any you don’t want and change any you do. These settings should persist if you install a future update too.

1 Like

Thank you. It’s all ‘cb’d’ up now. :slight_smile:

I’ve finished documenting Cluster for an initial release and I’ve resolved a few issues along the way (as well as logging some Bunch bugs). I’ve replaced the download and documentation links in the original post with a link to the new site. Enjoy, and please post below to let me know if you find it useful, or to let me know about any issues.

3 Likes

@sylumer I’ve been using Cluster for a couple of weeks now and it is my new standard mechanism to interact with Bunch. Thank you.

I did notice one misspelling in the documentation. On this page: Bunch Information | Cluster (for Bunch) the option for “File Path” is shown as “File Pah”.

I expect you are aware that there is a section in the Bunch help with links to integrations with, among other tools, Alfred. I suggest you let Brett know this is available so that he can add it to the Bunch help site (if you’ve not done so already).

Finally, Brett recently started a forum, at The BrettTerpstra.com Forum and you may wish to post an announcement on that forum. And if you do not wish to join yet another forum, I’d be happy to post a link to your Cluster site there.

Thank you again for the work in building this workflow.

1 Like

Always good to hear stuff I make to scratch my own technology itches are useful to others :sunglasses:

Thanks. That prompted me to do a site-wide spell check and check. I sorted eight such typos, fixed a few imperfect hyperlinks and added some image alt tags.

Brett is aware :wink:

I’m sure if Brett feels it is worth adding to the Launcher/Alfred/Raycast page he will do so in due course.

Please do feel free to post something on that forum if you think it would be help people to discover it.

You are very welcome, and again I’m simply glad to hear someone else has found it useful.

1 Like

Today I finally decided to install and try Cluster.

When I try to run bbo or bbe, I don’t get list of my bunches. Commands like bbh or bbw works.

Alfred version: 5.5 [2257]
Bunch version: Version 1.4.17 (180)
Cluster version: v1.0.1 (Downloaded today, 2024-06-05)

Below I paste result from debug window in Alfred preferences while trying to run bbo command:

[20:21:12.724] Cluster (for Bunch)[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.2476C4AC-9564-4953-816F-68048A302410%3E26C75914-9F31-44A2-9F10-796259F2C28A)] Queuing argument '(null)'
[20:21:13.430] Cluster (for Bunch)[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.2476C4AC-9564-4953-816F-68048A302410%3E26C75914-9F31-44A2-9F10-796259F2C28A)] Script with argv '(null)' finished
[20:21:13.431] Cluster (for Bunch)[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.2476C4AC-9564-4953-816F-68048A302410%3E26C75914-9F31-44A2-9F10-796259F2C28A)] {"items": [
	{
		"uid": "ejs",
		"arg": "ejs",
		"autocomplete": "ejs",
		"title": ""Eloquent JavaScript"",
		"icon":
		{
			"path": "./bunch.png"
		}
	},
	{
		"uid": "Example",
		"arg": "Example",
		"autocomplete": "Example",
		"title": "Example - Edit First!",
		"icon":
		{
			"path": "./bunch.png"
		}
	}
]}
[20:21:13.432] ERROR: Cluster (for Bunch)[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.2476C4AC-9564-4953-816F-68048A302410%3E26C75914-9F31-44A2-9F10-796259F2C28A)] JSON error: Badly formed object around line 6, column 13. in JSON:
{"items": [
	{
		"uid": "ejs",
		"arg": "ejs",
		"autocomplete": "ejs",
		"title": ""Eloquent JavaScript"",
		"icon":
		{
			"path": "./bunch.png"
		}
	},
	{
		"uid": "Example",
		"arg": "Example",
		"autocomplete": "Example",
		"title": "Example - Edit First!",
		"icon":
		{
			"path": "./bunch.png"
		}
	}
]}

Update

The reason I didn’t got my bunches was because one of them had title surrounded by “”. I removed them from the title in the yaml and now all works.

Thank you again for your work!

Well done on working it out, and you’re welcome :+1:t2:

The doubling of the double quotes breaks the JSON that Alfred is using to build the list. The double quotes in the title would need to be escaped when adding into the JSON to allow that to work.

"title": "\"Eloquent JavaScript\"",

I should be able to add something in to deal with this, but is it worth doing, or is it such an edge case that a note in the documentation to warn of it is sufficient? I think doing something is prudent, but I’m in two minds as to which as I’m not sure encouraging people to put double quotes in bunch titles is a wise thing, but then again, if people do, then perhaps I should accommodate that.

What do people think?

I think if you have clearly pointed it out on the documentation page, it should be enough.

The reason why I put the title in quotation marks is because I did not remember if titles with spaces were allowed or not in Bunch.

1 Like