parse CLI from C code