bheisig/cli
Composer 安装命令:
composer require bheisig/cli
包简介
Framework for command line interfaces
README 文档
README
PHP Framework for command line interfaces
About
You want an easy way to build a command line tool written in PHP? You are bored of big, over-engineered frameworks? And last but not least, you do not want to reinvent the wheel? -- Great, this could be the (almost) perfect solution for your next project.
The goal is to build intuitive CLI tools. Nobody likes to read documentation, so make your application self-descriptive!
Features
- Easy-to-install via Composer
- Perfectly suited to create a single binary file from your application
- Simple interface
- Separate your features by commands
- Runs on POSIX-like systems (GNU/Linux, MacOS, …) and Windows
- Error/exception handling
- Optional colored output based on log level
- Log to standard or error output
- Pre-defined usage output
- JSON-based configuration with defaults, system-wide, user defined and runtime settings
- Support for long and short options with optional or required values
- Pre-defined options for verbosity/quietness, usage, version information, additional configuration files, runtime settings, configuration test
- Verbosity mode outputs human-readable runtime in seconds and peak memory usage
Example
For a simple application look at the example/ folder.
Requirements
- PHP, version 7.1 or higher (7.0 works but is deprecated, 7.3 is recommended, unreleased 7.4 should work)
- PHP modules
calendar,cli,date,filterandjson
Installation
Go to your project folder and require this framework via Composer:
composer require bheisig/cli
Update
Composer is the way to go:
composer update
Copyright & License
Copyright (C) 2018-19 Benjamin Heisig
Licensed under the GNU Affero GPL version 3 or later (AGPLv3+). This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
bheisig/cli 适用场景与选型建议
bheisig/cli 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 741 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 01 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「app」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bheisig/cli 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bheisig/cli 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bheisig/cli 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Make your bundle an application
App Version Utility for CakePHP 2.x Applications
Slim starter / Slim skeleton package to boost your development with Slim framework
Generates a trait to help ease the access of custom repo methods
Eco CLI for Laravel .env syncing
FAQ app for the Elefant CMS
统计信息
- 总下载量: 741
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: AGPL-3.0
- 更新时间: 2018-01-16