romannowicki/clix
最新稳定版本:1.0.0
Composer 安装命令:
composer require romannowicki/clix
包简介
Command line tool for PHP
README 文档
README
Clix offers user friendly environment for command-line commands that can be used for any recurring task, such as cronjobs, imports, or other batch job.
- mapping command line argument to task variables
- display help message for task when --help parameter will be passed
- optional and required parameters
- default values for parameters
- asking user for input
- allow to hidden user input for confidential data
- by default all task are working in quiet mode to turn on console output --verbose parameter should be used
- options list with default value
- cli progress bar
Installation:
via Composer:
"require": {
"romannowicki/clix": "1.0.0"
}
Example of usage:
see example code bootstrap Basic task
To display available task list:
$ ./run
No task specified. Select one from below :
--------------------------------------
Basic : Basic example
HelloWord : Example HelloWord task
One/Foo : test example 1
Two/Foo : test example 2
To see help for specyfic task:
$ ./run HelloWord --help
**********************
Example HelloWord task
**********************
usage: ./run HelloWord [options]
options:
--help : Show this help message (default: NULL)
--verbose : Show output log messages (default: NULL)
firstname : Firstname used for output message (MANDATORY)
lastname : Lastname used for output message (MANDATORY)
--uppercase: Print name uppercase (MANDATORY)
MORE:
HelloWord is just an example, self explained.
To run single task:
./run HelloWord firstname=Adam lastname=Smith --uppercase --verbose
Progress Bar Example
$ ./run One/Foo msg=test delay=1 --verbose
29% [###################---------------------------------------] 29/ 100
romannowicki/clix 适用场景与选型建议
romannowicki/clix 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 357 次下载、GitHub Stars 达 0, 最近一次更新时间为 2014 年 10 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「task」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 romannowicki/clix 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 romannowicki/clix 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 romannowicki/clix 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Expose the DDev executable commands to the Robo task runner.
Task system for APPUI
Slim starter / Slim skeleton package to boost your development with Slim framework
Generates a trait to help ease the access of custom repo methods
AsyncTask enables proper and easy use of the thread. This class allows to perform background operations and publish results on the thread without having to manipulate threads and/or handlers.
This is a PHP Framework base on Swoole
统计信息
- 总下载量: 357
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-10-31