Execute BTT Action from command line or shell script?

BTT can be used to set up some powerful automations. Is there a way to execute BTT actions from the command line or a shell script?

yes, the best way is to use the osascript command line utilitiy, which you can use to trigger any of BTT’s scripting functions.

I can post an example later!

Thanks, an example would be appreciated.

Maybe you could also comment on what I'm trying to accomplish: I'd like to be able to restore window positions on a multi-monitor, multi-Space configuration (M3 MacBook Pro, Sequoia). Everything is rearranged after a sleep (sometimes). The BTT restore saved configuration only seems to work with Spaces (Desktops) that are currently visible. I'm thinking that through a combination of window moves and switching Desktops I can get the windows to where they need to go (with lots of flashing). I would typically only do this after a sleep, so I don't mind some few moments of chaos while everything gets rearranged. But I thought that since it may be a complicated series of moves, capturing it in a shell script would be easier for tweaking.

Any comment or advice on the feasibility of this would be appreciated.

(And why macOS can't restore everything when the monitor configuration has not changed, is still a puzzlement and a disappointment to me.)