定制 aliengen/pachyderm-console 二次开发

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

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

aliengen/pachyderm-console

Composer 安装命令:

composer require aliengen/pachyderm-console

包简介

A command tool for Pachyderm

README 文档

README

PHP Version License

A simple and reliable console tool. Create CLI commands to execute code.

✨ Features

  • 🔄 Auto-Discovery: No need to register your commands
  • ⚡ Zero Config: Works out of the box
  • 🤖 Easy Setup: Simple command to set up the console structure

📋 Requirements

  • PHP: 8.4 or higher
  • Composer: For dependency management

🚀 Quick Start

Installation

composer require aliengen/pachyderm-console

Setup

After installation, run the setup command to create the necessary files:

./vendor/bin/pachyderm-console --setup

This will automatically create:

  • src/Commands/ folder for your commands files
  • console.php file for easy execution

Basic Usage

  1. Create a command by adding a class to src/Commands/:
<?php

namespace Src\Commands;

use Pachyderm\Console\CommandInterface;

class MyCommand implements CommandInterface
{

    public function __construct() {
    }
    public function getName(): string
    {
        return 'my-command';
    }

    public function getDescription(): string
    {
        return 'My custom command';
    }

    public function run(array $arguments = []): void
    {
        echo 'Message from my custom command'
    }
}
  1. Run commands using any of these methods:
# Option 1: Using the generated migration.php file
php console.php [command name]

# Option 2: Using the vendor binary directly
./vendor/bin/pachyderm-console [command name]

That's it! Your migration will be executed and tracked automatically.

📚 Usage

Display all available commands using any of these methods:

# Using the generated file
php console.php

# Using the vendor binary
./vendor/bin/pachyderm-console

📁 Project Structure

your-project/
├── src/
│   └── Commands/
│       ├── MyCommand.php
│       ├── MyOtherCommand.php
├── vendor/                  # Composer dependencies
├── console.php              # Console execution script
└── composer.json

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

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

📞 Support

Made with ❤️ by the AlienGen team

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-02