How about storing plain text files on a cloud server with Syncthing? https://syncthing.net/ (I'm not affiliated with them.) I think it works on mobile and looks like it exposes a rest api too.
So you can have local scripts that affect the files and the changes will be synced for your other devices to see.