SOLVED: Shell logic commands in Plugin

A need a plugin for Shell commands.

# create a plugin
bin/cake bake plugin "ShellTest"

Ok, a have a folder src/plugins/ShellTest
Create a file src/plugins/ShellTest/src/Shell/PoleShell.php

namespace ShellTest\Shell;

use Cake\Console\Shell;

class PoleShell extends Shell {
    public function main()
    {
        $this->out('<warning>Fire!!!</warning>');
    }
}

and run command

bin/cake "pole"

And I’m getting a Exception message

Exception: Unknown command `cake t34`. Run `cake --help` to get the list of valid commands. in [./my_app_name/vendor/cakephp/cakephp/src/Console/CommandRunner.php, line 346]

Can someone help?

My first solution through composer. Not easy, but worked!

I’m created a repo with plugin. Added to composer.json file and published this pakage as xv1t/shell-test
in the project tree.

A am changed a pluginname to ShellTest and shell class to PoleShell

composer require "xv1t/shell-test" --dev;
bin/cake plugin load "ShellTest";

After the install run in the console for project

# type by Shell name is `pole`
bin/cake "pole"

It worked.