Conversion to rex-cli