add cli event loop