I'm trying to edit a note and sync it using the command line tools in a script. I'm doing the following:
joplin use Notebook
joplin set Note body "Body content"
joplin e2ee encrypt -p password
joplin sync
The note editing itself seems to work, but syncing doesn't. I'm not really sure where the error lies. To get sync to work, I have to open the full terminal app, edit and save the note (without changing it), and then run sync. (Running sync without editing the note first does not work.)
There's no e2ee encrypt command so are you sure your script doesn't just stop working at that line and never synchronises?
In general you don't need to worry about e2ee when uploading data because encryption is done during sync. It's only when downloading that you should run e2ee decrypt to decrypt new items (normally this is a background process but in a script you'd need to call it explicitly).
I've been testing the whole flow by hand one command at a time, so can confirm the sync should be happening but isn't.
I saw there was no encrypt in the docs so I didn't use it to begin with. I thought I'd try it out of desperation and it didn't throw an error, so I thought it might be doing something.
$ joplin set Note body "I will not sync"
$ joplin sync
Synchronisation target: Dropbox (7)
Starting synchronisation...
Completed: 29/08/2021 21:42 (5s)
Downloading resources...
$
It doesn't say it's trying to sync anything, and my other devices don't see any changes until I've run sync through the terminal app. (And even then the note needs to be edited and saved before even the app will sync it)
If I change things on another device, joplin sync correctly finds the changes and downloads them.