Linux command line - query nextcloud sync state


Nextcloud is the only reason I (still) have a system tray. Therefore my question: Is there a way to query the sync state of the nextcloud client via cli?

I think it would theoretically be possible to read the nextcloud log file and extract the information from there but that seems like an ugly solution.

Any ideas?

Thanks in advance