定制 crazywhalecc/cli-helper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

crazywhalecc/cli-helper

最新稳定版本:0.1.0

Composer 安装命令:

composer create-project crazywhalecc/cli-helper

包简介

README 文档

README

A simple PHP CLI helper.

Basic Usage

You can just download the packed executable phar for this helper.

wget https://github.com/crazywhalecc/php-cli-helper/releases/download/0.1.0/cli-helper
chmod +x cli-helper
# Run it!
./cli-helper

Pack Project to Single Executable File (PHP Installed required)

  1. move cli-helper into PATH
# If you don't want to move it, remember your download path and directly execute it with its path.
# If you are not root, remember using `sudo`.
mv ./cli-helper /usr/local/bin/cli-helper
  1. cd to your project which will be packed, e.g. /home/ubuntu/your-project, and clean your dev dependencies.
cd /home/ubuntu/your-project
composer update --no-dev
  1. RUN cli-helper, pack current directory.

Notice: This command will ask you target phar path, entrypoint file name, etc.

cli-helper pack . app.phar
  1. Make phar executable
# add X permission
chmod +x /tmp/app.phar

# remove phar suffix, like a binary executable
mv /tmp/app.phar /tmp/your-app-name

# You can use it any way you like, for example, move to system PATH to execute it directly
cd /tmp
./your-app-name

mv your-app-name /usr/local/bin/
your-app-name

Make standalone binary executable with PHP (multiple arch supported)

Prepare your phar file packed through the above steps, we assume your phar name is your-app.phar.

# Download micro builds from `static-php-cli` project, remember check the latest PHP version from `https://dl.zhamao.xin/php-bin/file/` !
# You can change `x86_64` to `aarch64`, `armv7l`。
wget https://dl.zhamao.xin/php-bin/file/micro-8.0.19-x86_64.tar.gz
tar -zxvf micro-*.tar.gz
# Combine micro and your phar files
cat ./micro your-app.phar > your-app-standalone
chmod +x your-app-standalone

# Then just execute it anywhere, even your another machine have no php environment!
./your-app-standalone

Notice: This project is a complement to static-php-cli, for more details, check this link.

crazywhalecc/cli-helper 适用场景与选型建议

crazywhalecc/cli-helper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 636 次下载、GitHub Stars 达 19, 最近一次更新时间为 2022 年 06 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 crazywhalecc/cli-helper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 crazywhalecc/cli-helper 我们能提供哪些服务?
定制开发 / 二次开发

基于 crazywhalecc/cli-helper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 636
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2022-06-04