wordcoolframework/cool-cli 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

wordcoolframework/cool-cli

最新稳定版本:1.0.0

Composer 安装命令:

composer require wordcoolframework/cool-cli

包简介

CoolView CLI

README 文档

README

CoolCLI is a lightweight and extensible CLI tool for executing custom commands in PHP. With CoolCLI, you can easily define your own commands and use them

🚀 Features

  • Easy Command Definition: Create your own command classes and add them to the CLI.
  • Supports Arguments & Options: Define various arguments and options for your commands.
  • Modular Structure: Add new commands without modifying the core CLI.
  • Similar to Laravel Artisan: If you're familiar with Artisan, CoolCLI will feel intuitive.

📥 Installation

To install CoolCLI, run the following command:

composer require wordcoolframework/cool-cli

📌 Defining a New Command

To create a new command, add a new class in the command/ directory. For example, GreetCommand.php:

namespace Command;

final class GreetCommand {
    public string $commandName = 'greet';
    public string $description = 'Prints a greeting message';

    public static function handle(?string $name = 'World') : void {
        echo "Hello, $name!\n";
    }
}

Now, you can execute this command:

php cool greet
php cool greet John

🛠️ Configuration

CLI settings are stored in the config.php file:

return [
    "CommandNamespace"  => "\\Command",
    "CommandDirectory"  => "/command",
];

🌍 Contributing

🔹 Contributions and improvements are always welcome! To contribute:

  • Fork this repository.
  • Create a new branch (git checkout -b feature-name).
  • Commit your changes (git commit -m 'Add some feature').
  • Submit a Pull Request to the main repository.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固