Command line

Swoft provides powerful command-line app processing capabilities. Swoft HTTP server, WebSocket server, and so on are started and managed through the command line.

Feature features

  • Command line app, command line parsing run, @Command @CommandMapping automatic collection registration based on annotation
  • Supports setting aliases to commands, command groups, and a command can have multiple aliases.
  • Full-featured command-line option parameter resolution (naming parameters, short options, long Options ...), under command line input , output manage, use
  • Command method annotation automatically resolves to help information (support @CommandOption @CommandArgument @example and other annotations)
  • Supports the output of multiple color style message text (,,,, info comment success warning danger error ...)
  • Commonly used special format information display (,,,,,,, section panel padding helpPanel table 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 )
  • Color output is windows linux mac compatible, and environments that do not support color automatically remove related code
  • Support for both co-and non-co-process (traditional synchronous blocking) two ways to run commands
  • Built-in Phar packaging tool class makes it easy to package apps into phar files for easy distribution and use as tools
  • Fast bash/zsh Auto-fill script (TODO) for current application generation environments

swoft/consoleBased on the inhere/php-console improvement, and refer to the symfony/console part of the characteristics.

/docs/2.x/en/console/index.html
progress-bar