aliengen/pachyderm-console
Composer 安装命令:
composer require aliengen/pachyderm-console
包简介
A command tool for Pachyderm
README 文档
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.phpfile 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
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-02