add entry point for cli
fix error handling
avatar, delete support