Ported the old synching cli code for the new API