A simple and reliable console tool. Create CLI commands to execute code.
- 🔄 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
- PHP: 8.4 or higher
- Composer: For dependency management
composer require aliengen/pachyderm-consoleAfter installation, run the setup command to create the necessary files:
./vendor/bin/pachyderm-console --setupThis will automatically create:
src/Commands/folder for your commands filesconsole.phpfile for easy execution
- 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.
Display all available commands using any of these methods:
# Using the generated file
php console.php
# Using the vendor binary
./vendor/bin/pachyderm-consoleyour-project/
├── src/
│ └── Commands/
│ ├── MyCommand.php
│ ├── MyOtherCommand.php
├── vendor/ # Composer dependencies
├── console.php # Console execution script
└── composer.json
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
Made with ❤️ by the AlienGen team