Download the PHP package hongye/rc-cmd without Composer

On this page you can find all versions of the php package hongye/rc-cmd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rc-cmd

PHP 命令行脚本框架库

背景

部分业务使用PHP编写运维脚本, 但PHP缺乏一个易用的命令行程序开发库. 此框架的基于注解的方式支持填空式的快速开发命令行脚本. 并提供统一的日志|参数解析|控制台格式输出|帮助文档能力.

使用方法

引入依赖

在运维脚本项目中引入依赖.

编写运维工具类

创建一个工具类比如SampleTool, 并继承\Ruochen\Tools\CommandTool, 分别在类和方法上加上如下注解. 最终通过调用 SampleTool::getInstance()->process(); 使类文件变为脚本, 并为类文件加上可执行权限.

框架实现了一些易用的注解,基于注解快速定义命令、命令选项、命令参数. 由于PHP本身并不支持注解, 故注解需要添加在文档注释中.

可以为IDE添加注解支持

@\Ruochen\Annotations\Command

此注解为工具定义一个命令,属性如下

@\Ruochen\Annotations\Operand

此注解为命令定义一个操作数,属性如下

@\Ruochen\Annotations\Option

此注解为命令定义一个选项。此注解可以注解在class或者command method上,如果注解在class上,则在所有command method上都可以访问到

示例

命令工具文件 sample

命令行提示

运行依赖


All versions of rc-cmd with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
nette/utils Version ^2.4
jbzoo/utils Version ^2.2
hassankhan/config Version ^0.11.2
monolog/monolog Version ^1.23
symfony/yaml Version 3.3.5
ulrichsg/getopt-php Version ^3.0
doctrine/annotations Version 1.4.0
league/climate Version ^3.2
vlucas/phpdotenv Version ^2.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package hongye/rc-cmd contains the following files

Loading the files please wait ....