mitsuki/commands 问题修复 & 功能扩展

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

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

mitsuki/commands

最新稳定版本:v1.0.0

Composer 安装命令:

composer require mitsuki/commands

包简介

A powerful command-line interface library for the Mitsuki framework.

README 文档

README

Mitsuki Commands is the dedicated CLI (Command Line Interface) engine for the Mitsuki Framework. Built on top of Symfony components, it provides an elegant and robust interface to manage your development tasks, featuring a built-in development server.

🚀 Key Features

  • Stylized Console: Custom ASCII branding for a premium developer experience.
  • Built-in Dev Server: Easily launch your Mitsuki application with routing support via a single command.
  • Extensible Architecture: Seamlessly register custom commands to automate your workflow.
  • Process Management: Uses proc_open for stable and controllable server execution.

🛠 Installation

Install the package via Composer:

composer require mitsuki/commands

📖 Usage

1. Create the Entry Point

Create a file named mitsuki (no extension) in your project root:

#!/usr/bin/env php
<?php

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

use Mitsuki\Command\ServerCommand;
use Mitsuki\Console\ConsoleApplication;

// Register your commands here
$app = new ConsoleApplication([
    new ServerCommand(),
]);

$app->run();

Make the file executable:

chmod +x mitsuki

2. Running the Server

To start the Mitsuki development server on the default port (8000):

./mitsuki run:serve

Available Options:

  • --host or -H: Change the host (Default: 127.0.0.1)
  • --port or -p: Change the port (Default: 8000)

Example:

./mitsuki run:serve --port=9000 --host=0.0.0.0

🏗 Adding Custom Commands

To create a new command, extend the Symfony\Component\Console\Command\Command class and register it in your ConsoleApplication instance.

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;

#[AsCommand(name: 'app:my-task', description: 'Does something awesome')]
class MyTaskCommand extends Command 
{
    // Your logic here...
}

🛡 Security

This component is part of the Mitsuki Framework | Security Edition. It is designed to handle system processes cleanly and provides clear feedback while maintaining a secure environment for local development.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

**Developed with ❤️ by Zgeniuscoders**

Need help? Feel free to open an Issue or submit a Pull Request!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固