[cli] added option of using callback to cli.createRouter