switon/cli

CLI commands and console tooling for Switon Framework

Maintainers

Package info

github.com/switon-php/cli

Documentation

pkg:composer/switon/cli

Statistics

Installs: 5

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-05-10 04:16 UTC

This package is auto-updated.

Last update: 2026-05-10 04:21:30 UTC


README

CLI commands and console tooling for Switon Framework.

Installation

composer require switon/cli

Requirements: PHP 8.3+

Quick Start

require __DIR__ . '/vendor/autoload.php';

use Switon\Cli\Kernel;

$kernel = new Kernel();
$kernel->start();
namespace App\Command;

use Switon\Core\Attribute\Autowired;
use Switon\Core\Contract\ConsoleInterface;

class GreetCommand
{
    #[Autowired] protected ConsoleInterface $console;

    /**
     * Output a demo greeting.
     *
     * @param string|null $name Who to greet.
     */
    public function helloAction(?string $name = null): void
    {
        $this->console->success('Hello, {name}!', ['name' => $name ?? 'world']);
    }
}

Docs: https://docs.switon.dev/latest/cli

License

MIT.