cli refactor
pubsubsql refactor