Installation
Install Terminal with Composer.
shell
composer require raxos/terminalRequirements
- PHP 8.5 or newer.
- The
mbstringextension (ext-mbstring).
The package pulls in a few third-party libraries: league/climate for terminal output and prompts, and nunomaduro/collision for rich error reporting.
Raxos dependencies
Terminal builds on other Raxos packages:
- foundation: the
env()helper used by theCautionandEnvironmentmiddleware, and theOptionvalue type used while parsing commands. - contract: the
CommandInterface,MiddlewareInterfaceandTerminalInterfacecontracts that commands, middleware and custom terminals implement. - error: the base
Exceptionclass that every exception inRaxos\Terminal\Errorextends. - collection: the
ArrayListused by the built-in help command to sort and filter registered commands.
The container package is optional. Pass a container to the Terminal constructor when your commands request services through untyped constructor parameters.
Return to the Terminal introduction.