setName('hello:world') ->setDescription('Outputs \'Hello World\''); } protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('Hello world!'); } } $command = new HelloWorldCommand(); $application = new Application(); $application->add($command); $application->setDefaultCommand($command->getName()); $application->run();