cli implementation