Document API
Use public api in CLI