public function unpackCommand($in, $out): int
    {
        if (!$path = $in->getSameOpt(['f', 'file'])) {
            return $out->error("Please input the phar file path by option '-f|--file'");
        }

        $basePath = $in->getPwd();
        $file = \realpath($basePath . '/' . $path);

        if (!\file_exists($file)) {
            return $out->error("The phar file not exists. File: $file");
        }

        $dir = $in->getSameOpt(['d', 'dir']) ?: $basePath;
        $overwrite = $in->getBoolOpt('overwrite');

        if (!\is_dir($dir)) {
            Helper::mkdir($dir);
        }

        $out->write("Now, begin extract phar file:\n $file \nto dir:\n $dir");

        PharCompiler::unpack($file, $dir, null, $overwrite);

        $out->success("OK, phar package have been extract to the dir: $dir");

        return 0;
    }