[cli] Add online command to the API wrapper.