aliengen/pachyderm-console

A command tool for Pachyderm

dev-main 2025-09-02 09:51 UTC

This package is auto-updated.

Last update: 2025-09-02 10:14:48 UTC


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