gspataro / cli
轻松创建终端应用程序
2.0.1
2023-05-10 15:59 UTC
Requires
- php: >=8.1
Requires (Dev)
- pestphp/pest: ^2.4.0
README
一个用于轻松创建可扩展和可执行CLI脚本的组件。包括一个类,以简化方式格式化文本作为终端输出。
安装
需要 PHP ^8.2
通过composer要求GSpataro/CLI
composer require gspataro/cli
快速开始
use GSpataro\CLI; // Initialize the commands collection $commands = new CLI\CommandsCollection(); // Create a command called 'hi' that will print 'hello world' to the console $commands->create('hi') ->setCallback(fn(CLI\Input $input, CLI\Output $output) => $output->print('Hello world!')); // Initialize the component by providing a collection of commands $handler = new CLI\Handler($commands); $handler->deploy();
如果您想了解更多关于此组件的功能,请阅读WIKI。
贡献
如果您想为此存储库做出贡献,请遵循以下指南:CONTRIBUTING.md
还可以关注我的Twitter:@gspataro96
变更日志
要查看所有最新更改,请参阅CHANGELOG。
许可
GSpataro/CLI组件根据MIT许可授权。