php console command,GitHub - inhere/php-console: PHP CLI application library, provide console argum...

PHP Console

68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f696e686572652f636f6e736f6c652e7376673f7374796c653d666c61742d737175617265

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e322e302d627269676874677265656e2e7376673f6d61784167653d32353932303030

687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e686572652f636f6e736f6c652e737667

badge.svg

A simple, full-featured php command line application library.

Provide console parameter parsing, command run, color style output, user information interaction, and special format information display.

Command line preview

7bc632092a02d7acc1bd96afa030caea.png

Features

Easy to use. Can be easily integrated into any existing project.

Command line application, controller, command parsing run on the command line

Support for setting aliases for commands. A command can have multiple aliases. Support command display/hide, enable/disable

Full-featured command line option parameter parsing (named parameters, short options -s, long options --long).

The input, output of the command line, management, use

Command method comments are automatically parsed as help information (by default, @usage @arguments @options @example)

Support for outputting message texts of multiple color styles (info, comment, success, warning, danger, error ... )

Commonly used special format information display (section, panel, padding, helpPanel, table, tree, title, list, multiList)

Rich dynamic information display (pending/loading, pointing, spinner, counterTxt, dynamicText, progressTxt, progressBar)

Common user information interaction support (select, multiSelect, confirm, ask/question, askPassword/askHiddenInput)

Support for predefined parameter definitions like symfony/console (giving parameter values by position, recommended when strict parameter restrictions are required)

The color output is windows linux mac compatible. Environments that do not support color will automatically remove the relevant CODE.

Quickly generate auto-completion scripts for the current application in the bash/zsh environment

NEW: Support start an interactive shell for run application

Built-in tools

Built-in Phar packaging tool class, which can be easily packaged into phar files. Easy to distribute and use

Run the command php examples/app phar:pack in the example, which will package this console library into an app.phar

Built-in file download tool class under command line with progress bar display

Command line php code highlighting support (from jakub-onderka/php-console-highlighter and making some adjustments)

Simple Terminal screen, cursor control operation class

Simple process operations using classes (fork, run, stop, wait ..., etc.)

All features, effects; can be run in the example code phps/app in examples/. Basically covers all the features and can be tested directly

Installation

composer require inhere/console

Document List

Please go to WIKI for detailed usage documentation

Project address

Unit test

phpunit

// output coverage without xdebug

phpdbg -dauto_globals_jit=Off -qrr /usr/local/bin/phpunit --coverage-text

License

My other projects

inhere/php-validate A compact and full-featured php verification library

inhere/sroute Lightweight and fast HTTP request routing library

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值