use Symfony\Component\Console\Output\OutputInterface; class MyCommand extends Command { protected function execute(InputInterface $input, OutputInterface $output) { // Output a progress bar if the output is very verbose if ($output->isVeryVerbose()) { $progress = new ProgressBar($output); $progress->start(); // Some time-consuming operation for ($i=0; $i<100; $i++) { sleep(1); $progress->advance(); } $progress->finish(); $output->writeln("\nTask completed."); } // Normal output $output->writeln('Hello, world!'); } }In this example, the command checks whether the output is very verbose before displaying a progress bar to indicate the progress of a time-consuming operation. The progress bar is only shown when the user explicitly requests very verbose output. The package library for OutputInterface is "symfony/console".