extend client lib commands and switch CLI to client lib