Console CLI

The SysVector CLI console, based on Symfony Console, allows you to efficiently manage your project using command-line commands.

Useful Commands

Extending with More Commands

The Symfony Console allows you to create and extend custom commands. Here is an example of how to create a custom command:

            
                // src/Command/SayHelloCommand.php
                namespace App\Command;

                use Symfony\Component\Console\Command\Command;
                use Symfony\Component\Console\Input\InputInterface;
                use Symfony\Component\Console\Output\OutputInterface;

                class SayHelloCommand extends Command
                {
                    protected static $defaultName = 'app:say-hello';

                    protected function configure()
                    {
                        $this
                            ->setDescription('Says hello.')
                            ->setHelp('This command allows you to say hello...');
                    }

                    protected function execute(InputInterface $input, OutputInterface $output)
                    {
                        $output->writeln('Hello from SysVector!');
                        return Command::SUCCESS;
                    }
                }
            
        

To register the command, add it to the service in the config/services.yaml file:

            
                # config/services.yaml
                services:
                    App\Command\SayHelloCommand:
                        tags: ['console.command']
            
        

Now you can execute the custom command:

            
                $ php bin/console app:say-hello
            
        

For more information about available commands and how to create custom commands, check the Symfony Console documentation.





Contact

If you're interested in SysVector, get in touch:


Donations via PAYPAL

If you wish to support the development of SysVector, consider making a donation via PAYPAL to Donate via PayPal