[CLI] sub-notebooks are not shown under the correct parent notebook

For some reason the sub-notebooks are not shown under the correct notebook. They are however denoted by an extra space in front of the notebook name.

Desktop client

Notebook 1
  Sub-notebook 1.A
Notebook 2
Notebook 3
Notebook 4

CLI client

Notebook 1
Notebook 2
Notebook 3
  Sub-notebook 1.A
Notebook 4

@laurent is this something that can be fixed easily? The code must be there already, since it works on all other platforms.

Yes I think so. I didn’t know about this bug. So i guess the correct one is the desktop app?

Yes, the desktop app and the mobile apps show the tree correctly.

/ref https://github.com/laurent22/joplin/issues/795

If I saw correctly, I saw this issue is resolved, but using the current joplin cli, how can I create a sub-notebook?

Also the Hierarchy is not shown.

joplin@joplin:~$ time joplin sync
Synchronization target:  (9)
Starting synchronization...
Fetched items: 1/2.
Created local items: 2. Fetched items: 2/2. Completed: 26/12/2024 19:02 (5s)
Downloading resources...

real    0m7.244s
user    0m1.254s
sys     0m0.164s
joplin@joplin:~$ joplin status
# Attachments

Not downloaded: 0
Downloading: 0
Downloaded and decrypted: 0
Downloaded and encrypted: 0
Created locally: 0
Error: 0

# Sync status (synced items / total items)

Note: 2/2
Folder: 2/2
Resource: 0/0
Tag: 0/0
NoteTag: 0/0
Revision: 0/0
Total: 4/4

Conflicted: 0
To delete: 0

# Notebooks

cli-202412: 1 notes
sub-20241226: 1 notes
joplin@joplin:~$ joplin ls /
cli-202412
sub-20241226

In Desktop app I have

Which am I doing wrong?

joplin ls / does not show the subnotebooks with a space. The TUI does. (run joplin)

Unfortunately the CLI app still has a few problems. e.g. when you create folders or notes that have the same name, you have to use $n, $b, and $c to reference an item, otherwise a random one will be used (the first one that is found in internal search).
But in newer versions it shows the id in brackets, if there are items with the same name. The id can also be used to reference an item.

You cannot create a subfolder in one step.
You have to create a folder sub and then move it to the other folder (let's use the name top for that folder): mv sub top

1 Like

ok, thank you.
Is there a way to "browse", without syncing the joplin?
E.g. having the joplin cli installed on the joplin server, I dont see a need to resync every time.

Nope. A client always requires the notes locally.

The data on the sync server might not be readable at all. e.g. encryption.