src/Valkyrja/Console/NativeConsole.php
public function command(string $name): ? Command
    {
        return $this->hasCommand($name)
            ? self::$commands[self::$namedCommands[$name]]
            : null;
    }
public function command(string $name): ? Command
    {
        return $this->hasCommand($name)
            ? self::$commands[self::$namedCommands[$name]]
            : null;
    }
Get a command by name.

@param string $name The command name

@return \Valkyrja\Console\Command