Trigger Sync from Terminal

Hi - I’m just wondering if there is a way to trigger sync from the terminal in macOS?

Hi Rick, good to hear from you!

Currently, there is no way to kick off a sync via Terminal. What did you have in mind?

We’ve always tried to make Codebook a good Mac app in the sense of adopting core OS technologies, but we have yet to look into providing scripting services / automation / AppleScript compatibility. Checking whether Codebook is unlocked and kicking off a sync might be a nice lead into that.

Hi @wgray! I’m thinking that I’d like to have a way to trigger a sync from my maintenance script. I’m just doing simple things like “brew upgrade” or “mas upgrade” and so on, and want to trigger sync regularly just as a rule, because sometimes I forget to. I always remember to run my upgrade script every day so, I thought it would be good to have the ability to trigger a sync during that.

Something like:

/Applications/Codebook.app/Contents/path/to/cbterm —sync

…if it were possible to have some small helper lib executable that could be bundled with the Codebook.app app.

Kind regards
Rick