Share notes between Joplin CLI and GUI

Hi,

I’m discovering Joplin and like the way it’s done. I think I’m going to adopt it for some of my daily routines.

I have a small question about sharing notes between CLI and GUI. I would like to use both of them on the same notes. I also plan to automate some notes creations using bash scripting.

I understand that these apps do not work on the same physical notes. They must sync on a common folder and duplicate them, so I end up with 3 copies of my notes on my HD. Am I right ? Is it possible to avoid that and configure them to share the same files ?

If it’s not possible, there is another thing that could be helpful : with this setup, I need to wait the sync, or force it manually, to get the changes made on one side to another. Is there a way to perform the sync more frequently ? (currently the faster is every 5 mins).

Thanks a lot by advance for your hints, and congrats again for your good piece of software.

Gilles.

1 Like

Hi
Just provide the profile path of the joplin-deskop version when you want to use the cli version

joplin --profile ~/.config/joplin-deskop

for example.

Avoid to launch the two in same time to not corrupt notes when syncing.

1 Like

I’d suggest documenting this useful option/usage/attention in the terminal documentation

BTW, is it possible to write a new terminal client that simply use the newly-released api of joplin, hence avoid the risk of concurrent operations on the sqlite? @ “Hacktoberfest”

Perhaps we could name the new client as joplin-cmd-client or joplin-cc to avoid name clashing with joplin-terminal.

I foresee that in some (near?) future there will be a small, fast, standalone Joplin server and both cli and gui clients will communicate with it. When cli or gui autostarts the server, the difference between a standalone client and a server communicating client disappears.

I think a Joplin server/client scenario would actually be great if it ever does happen. If Evernote were holding my data on their servers in the clouds somewhere, I guess it should be possible for me to have that data on the machine in my basement and my various devices just syncing with it.

I am no technical person so don’t have a clue how easy or difficult it would be or whether this suggestion should even be in this chat at all and not somewhere else.

you can just use curl to add/remove/edit/get note like

curl -X GET http://127.0.0.1:41184/notes

Basically that's the idea. The server-client mode could adapt to a wider range of complex environments. But there's one kink here. People usually have various requirements on the software - some enjoy the light-weighted while others prefer the not-so-lighted-weighted. So I'm wondering if one set of server layer could satisfy multiple sets of requirements.

That's useful, but many people I know in my neighborhood are already struggling with the common shell commands, not to mention these complex api-commands in detail. The out-of-the-box style could have people suffer less, unless we have other intentions.