CmdApi

Prepare #7
Fix #5
Fix #6