add get-current-cmd api