定制 rudra/cli 二次开发

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

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

rudra/cli

Composer 安装命令:

composer require rudra/cli

包简介

Cli Application

README 文档

README

PHPunit Maintainability CodeFactor Coverage Status

Rudra-Cli | API

The CLI component of Rudra Framework. Lightweight, straightforward, built on the KISS principle. No hidden dependencies, no magic — just clean, predictable command routing.

Install

composer require rudra/cli

Usage

Create a file named rudra:

#!/usr/bin/php
<?php

if (php_sapi_name() !== 'cli') {
    exit;
}

require __DIR__ . '/vendor/autoload.php';

use Rudra\Cli\Console;
use Rudra\Cli\Tests\App\Command\TestCommand;

parse_str(implode('&', array_slice($argv, 1)), $inputArgs);

$console = new Console();
$console->addCommand('spongebob', [TestCommand::class]);
$console->addCommand('second', [TestCommand::class, "actionSecond"]);

$console->invoke($inputArgs);
Run via PHP:

php rudra spongebob

  • Are you ready, kids? Say AYE, captain: yes
  • I can't hear you!!!

php rudra spongebob

  • Are you ready, kids? Say AYE, captain: AYE
  • Who lives in a pineapple under the sea?! SPONGEBOB SQUAREPANTS!!!
Or make it executable and run directly:
chmod +x rudra
./rudra spongebob

License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0) — a free, open-source license that:

  • Requires preservation of copyright and license notices,
  • Allows commercial and non-commercial use,
  • Requires that any modifications to the original files remain open under MPL-2.0,
  • Permits combining with proprietary code in larger works.

📄 Full license text: LICENSE
🌐 Official MPL-2.0 page: https://mozilla.org/MPL/2.0/

统计信息

  • 总下载量: 1.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 10
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2021-01-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固