Generate public share links from desktop app cli or nextcloudcmd

Hi folks,

is it possible to get a share link via cli of the desktop app?

Use case:
I want to generate QR codes automatically for certain folders with the public link to them.
Currently this is only possible via GUI clicking: Click on file/folder, context menu, nextcloud, share, generate link, copy link, …, generate QR code.

Thank you very much
Chris

Did you try checking on the cli? There is also the desktop github repo

nextcloud --help
or a similar command depending on your desktop machine.

$ nextcloudcmd --help
nextcloudcmd - command line Nextcloud client tool

Usage: nextcloudcmd [OPTION] <source_dir> <server_url>

A proxy can either be set manually using --httpproxy.
Otherwise, the setting from a configured sync client will be used.

Options:
  --silent, -s           Don't be so verbose
  --httpproxy [proxy]    Specify a http proxy to use.
                         Proxy is http://server:port
  --trust                Trust the SSL certification.
  --exclude [file]       Exclude list file
  --unsyncedfolders [file]    File containing the list of unsynced remote folders (selective sync)
  --user, -u [name]      Use [name] as the login name
  --password, -p [pass]  Use [pass] as password
  -n                     Use netrc (5) for login
  --non-interactive      Do not block execution with interaction
  --max-sync-retries [n] Retries maximum n times (default to 3)
  --uplimit [n]          Limit the upload speed of files to n KB/s
  --downlimit [n]        Limit the download speed of files to n KB/s
  -h                     Sync hidden files, do not ignore them
  --version, -v          Display version and exit
  --logdebug             More verbose logging
  --path                 Path to a folder on a remote server

yes, but unfortunately I can’t find anything here to create a public share link: cloud.example.com/s/abcdefgh

OCS Share API – click here for documentation is what you must script. I have never used it, but that is your tool, as mentioned on this post.
Seems you cannot script share options with only the desktop cli (nextcloudcmd) or with occ commands

Perhaps this could be expanded for the desktop client in the future. You could file an issue on the desktop github repo since nothing turns up. Reading the documentation turns up nothing in regards to sharing support from nextcloudcmd and the cli. It could at least be clarified that sharing is not supported from the cli and nextcloudcmd in the documentation. Or, perhaps OCS Share API support could one day be integrated. :person_shrugging: