mitsuki/commands

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

Maintainers

Package info

github.com/zgeniuscoders/mitsuki-commands

pkg:composer/mitsuki/commands

Statistics

Installs: 2

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 0

v1.0.0 2026-03-09 15:57 UTC

This package is auto-updated.

Last update: 2026-03-09 16:00:46 UTC


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!