If you really need exit codes, another option would be to write a command superclass (all your commands would inherit from it) that might have methods such as get_last_err_code, clear_err_code, set_err_code. The commands would set the error code inside run(). Other external entities (such as your test scripts) could access the error code (by first accessing the command object, which CLIF allows via get_current_command, registered_command_object, etc.) and take actions based on its value.
...but, as I explained, I recommend using proper exception handling instead.