Write CLI API