TempestTempest

A revolutionary way of building console applications in PHP.

Start with a simple composer require
composer require tempest/console:1.0-alpha.3

Make a console command class — anywhere you want

final readonly class Hello
{
    use HasConsole;

    #[ConsoleCommand]
    public function world(string $name): void
    {
        $this->success("Hello {$name}!");
    }
}

Run the command

./vendor/bin/tempest hello:world Brent

And that's it — like, for real. That's it.

Hello Brent

Command input definitions are defined by the method's signature, without any additional configuration.

final readonly class Hello
{
    use HasConsole;

    #[ConsoleCommand]
    public function world(
        string $name, 
        string $greeting = 'Hello', 
        bool $continue = false,
    ): void {
        $this->success("Hello {$name}!");
        
        if (! $continue && ! $this->confirm('Continue?')) {
            $this->error('Stopped');
            
            return;
        }
        
        // …
    }
}

Built-in interactive components, and much more.