For command line sync to the cloud you can use rclone. It's FOSS and works with many different cloud providers.
For a constant sync experience you can use insync. It's closed source and requires a license though, but works reasonably well.
Sorry for the lack of direct links since I'm on the phone.