refine code and add cli & bqconsumer ...