Skip to content
laranailPublic

About

Rich console toolkit for Laravel: fluent output (colors, boxes, trees, tables, progress) plus a prompts/forms layer with validators.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

laranail/console

Tests Static analysis License: MIT

laranail/console is not published to Packagist, so there is no registry-version badge to show: see Install.

A Rich-class console toolkit for Laravel — fluent terminal output (formatter, spinners, progress bars, boxes, trees, tables, charts, a Markdown + typography layer) and input (a laravel/prompts wrapper with a form builder and 26 validators).

Requires PHP ^8.4.1 on Laravel ^13 (Symfony 8).

Install

composer require laranail/console

The service provider, the Console/Prompter facades, and the prompter() helper are auto-discovered. Publish the config and language files if you want to customise them:

php artisan vendor:publish --tag=laranail::console-config
php artisan vendor:publish --tag=laranail::console-lang

Quick start guide and usage

Getting started

Nothing to configure: ConsoleServiceProvider registers itself through package discovery, together with the Console and Prompter facades and the prompter() helper. The config and language publishes above are only for customising them.

Usage

use Simtabi\Laranail\Console\Facades\Console;
use Simtabi\Laranail\Console\Tools\Commands\Command;

final class ReleaseSummaryCommand extends Command
{
    protected $signature = 'release:summary';

    public function handle(): int
    {
        $this->output->writeln(Console::status()->success('Build complete'));
        echo Console::box(['Version: 2.4.0', 'Env:     production'])->title('Release')->render();

        return self::SUCCESS;
    }
}

Progress and a prompt:

Console::spinner('Compiling…')->run(fn () => compile());

$name = Console::prompter()->text('Your name', required: true)->getResult();

The full walkthrough is in Getting started; everything else is in the documentation index.

Documentation

Full documentation is at opensource.simtabi.com/documentation/laranail/console — installation, getting started, the design system, architecture, configuration, and per-subsystem reference (theming, colours, typography, Markdown, charts, widgets, banners, panels, menus, the full-screen TUI, prompts & forms, and more).

Contributing & security

Issues and PRs are welcome — see CONTRIBUTING.md. Report vulnerabilities per SECURITY.md (security@simtabi.com); participation follows the Code of Conduct.

License

MIT © Simtabi LLC. See LICENSE.

About

Rich console toolkit for Laravel: fluent output (colors, boxes, trees, tables, progress) plus a prompts/forms layer with validators.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages