aliengen / pachyderm-console
A command tool for Pachyderm
dev-main
2025-09-02 09:51 UTC
Requires
- php: >=8.4
- aliengen/pachyderm: dev-master
This package is auto-updated.
Last update: 2025-09-02 10:14:48 UTC
README
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 filesconsole.php
file for easy execution
Basic Usage
- 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' } }
- 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
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
- Issues: GitHub Issues
Made with β€οΈ by the AlienGen team