Share data between Keyboard Maestro and Scriptable? (iCloud?)

I have been happily using the KM10 menu groups for a build monitor, but now I also want to create a macOS widget (using Scriptable) that shows the same information. The Scriptable script is limited in what it can do, but I have already made a proof-of-concept that gets the relevant information from a local server (a simple Bun script) and GitHub.

Instead of querying that local server (and maybe also GitHub) I'd rather reuse the info that I already obtained in my KM macros.

What would be a good way to share data (a few strings, maybe formatted as a dictionary) between Keyboard Maestro and Scriptable?

Scriptable can read files from iCloud and it would be great if Keyboard Maestro could write to an iCloud file, since I could use the same widget on my iPhone and iPad as well then (not possible with my proof-of-concept local server on the Mac).

Tips/tricks?

To be honest, I'm not familiar with most of the things in your post, but I do know that KM can write to my iCloud drive like this, I just put the path of the iCloud file location in the box below. So I'm not sure I agree with "KM cannot write to an iCloud file."

image

Upon reflection, I think you wanted KM to store all its macros in an iCloud file.

I think you might have misunderstood me, but thank you for putting me on the right track anyway! :smiley:

I'm going to experiment with this (and will report back).

Unfortunately iCloud support for Scriptable on Mac (beta!) seems broken on macOS Sonoma 14.2.

The author of Scriptable is not maintaining that beta and is focussing on creating Scriptable 2.0 instead.

Guess I should stop my efforts for now then.