Joplin Terminal profile setting/config? read-only?

Is there a way to set the profile in joplin terminal so it always opens the same notebooks I’m syncing with joplin desktop. I tried to set alias joplin = “joplin --profile location”, but that didn’t seem to stick.

I understand that sync conflicts could arise if i make changes while both clients are open, so I’m pretty good about making sure I have only one open. The terminal version has some stats/features that the desktop doesn’t have, and sometimes I want one or the other.

related: is it possible to have a --read-only flag for the joplin terminal

Thanks

With joplin --profile ~/.config/joplin-desktop (for Linux) you open all the stuff you own and access with the desktop

yes, and I have to type that in everytime.
If it was a config setting, I could just type joplin when I wanted to use my default setup.

Thus a simple alias should do the trick.

But :wink:

If you forget this alias, and enter Joplin --profile , you will face an issue with twice --profile parms

An alias should work. I have this one set and it works fine: alias j="joplin --log-level debug"

Maybe your alias doesn’t work because you give it the same name as the executable? What about with something like alias my-joplin="joplin --profile location" ?

I did wonder about that.

I can try to add a new alias. But, do you think making this a setting would be useful for more people?

Nope, I'm constantly using aliases to change the default behavior of commands. You probably don't have the joplin executable in your PATH and didn't specify the absolute path in the alias.
Also a ./joplin won't use the alias.

new alias works wonderfully. :wink: thanks.

1 Like

joplin --profile ~/.config/joplin-desktop should be part of the terminal docs. Luckily there was this post. This is the first thing I wanted to do in the terminal (i.e. open notebooks from desktop). Yea sure it needs a a caveat in there about editing both simultaneously.

1 Like

Well, spoke too soon. After opening notebooks in terminal now trying to open them in desktop gives

image

Apparently there is a breaking change between the terminal version 1.0.141 I installed via npm and the one installed via the desktop install script. (1.0.161)… arrh. Possible to keep the cli package current with the desktop version. It seems way behind.

The cli release 1.0.141 was released after the desktop release 1.0.161.

However, there should not be any breaking changes between those 2 versions. I don’t use the same database with CLI and desktop. On my macOS I run the desktop version and the CLI version and both use their own profile dir. I sync with Nextcloud. However, I agree that it should work with the same db as well.

Unfortunately there’s no new deskop release yet. Which OS are you on? I could create a macOS release for you (not signed though) from git master.

@laurent I thought after the history changes we won’t break compat without notifying the user first. This is a serious flaw (although a bit different, since the same db is used by 2 Joplin versions - even though 2 versions should have the same db structure). We can’t break the database this way. Is there anything we can do to guard this somehow? Or maybe add a flag that triggers above message? e.g. if there’s a db change that does not affect the app, there’s no need to trigger an upgrade error.

That’s not a breaking change, old versions of Joplin simply can’t read new versions of profiles.

The --profile flag is undocumented, and unsupported, for a good reason. You can still use it if you want, but it might cause problems like this. The only way out here is to get a CLI and desktop app that use the same db version.

Ah, I see. FYI: A lot of people use the --profile argument, because Joplin does not support multiple instances (with different profiles each).