beecodersteam / mycommands
A bunch of useful terminal commands
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/beecodersteam/mycommands
Requires
- php: ^8.3
- ext-mbstring: *
- ext-xml: *
- react/event-loop: ^1.5
- react/http: ^1.11
- symfony/console: ^7.2
- symfony/http-client: ^7.2
- symfony/process: ^7.2
Requires (Dev)
- mikey179/vfsstream: ^1.6
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.5
- dev-main
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-codex/melhorar-agents.md
- dev-codex/adicionar-mais-testes-de-integração
- dev-codex/encontrar-função-do-arquivo-agents.md
- dev-codex/run-script-in-install.sh-after-composer-global-require
- dev-codex/aumentar-a-cobertura-de-código
- dev-codex/increase-test-code-coverage
- dev-fix-autoload
- dev-codex/transform-project-into-a-packagist-library
- dev-codex/encontrar-e-corrigir-um-bug
- dev-codex/substituir-comentário-em-environmenthelper.php
- dev-codex/corrigir-string--reseting--para--resetting
- dev-codex/add-test-for-api-failure-handling
- dev-codex/explicar-a-base-de-código-para-iniciantes
- dev-new-changes
This package is auto-updated.
Last update: 2025-09-26 12:51:15 UTC
README
My Commands
A curated suite of CLI tools built with PHP and the Symfony Console component. Automate repetitive tasks, streamline your workflow and integrate with OpenAI for AI‑powered features. The project is designed for easy extension so you can add your own commands whenever needed.
🎬 Demo
Contents
📋 Prerequisites
Before installing and running the project, ensure you have the following:
- PHP 8.1+: Required runtime environment
- Composer: For dependency management
- Git: For version control operations
- OpenAI API Key: Required for AI-powered features (obtain from OpenAI's website)
✨ Features
- AI-Powered Git Commits: Generate semantic commit messages automatically
- OpenAI Integration: Send custom prompts and receive AI-generated responses
- Development Workflow Tools: Zip directories, manage environment variables, and more
- Docker Management: Easily list and stop Docker containers
- Currency Conversion: Convert between currencies directly from your terminal
- Extensible Architecture: Easily add your own custom commands
⚡ Quick Start
Run the installer script and reload your shell:
./install.sh source ~/.zshrc # or source ~/.bashrc
List available commands with:
my list
🚀 Installation
You can install My Commands in three ways:
Option 1: Using the Installation Script (Recommended)
# Run the installation script ./install.sh # Reload your shell configuration source ~/.zshrc # or source ~/.bashrc
The installation script automatically:
- ✅ Checks if PHP and Composer are installed
- ✅ Installs all dependencies
- ✅ Creates a symbolic link for global access
- ✅ Configures shell autocompletion
Option 2: Manual Installation
If you prefer step-by-step manual installation:
-
Install dependencies:
composer install
-
Create a symbolic link for global access:
sudo ln -s $(pwd)/bin/my /usr/local/bin/my -
Configure shell autocompletion:
# For Zsh echo "source $(pwd)/my-autocomplete.sh" >> ~/.zshrc # OR for Bash echo "source $(pwd)/my-autocomplete.sh" >> ~/.bashrc
-
Reload your shell configuration:
source ~/.zshrc # or source ~/.bashrc
Option 3: Install via Composer
Once this package is available on Packagist you can install it globally with Composer. The installer script will run automatically after installation:
composer global require luizalbertobm/mycommands
🔧 Usage
To see all available commands:
my list
Example Commands
# Generate AI-powered semantic commit message my ai:commit # Ask OpenAI a question my ai:ask "Write a poem about clean code." # Convert currency my currency:convert 100 USD EUR # Zip current directory my zip:all # Manage environment variables my env:set API_KEY your_api_key_here my env:unset API_KEY # Docker operations my docker:list my docker:stop-all
Command Autocompletion
Tab completion is automatically activated during installation. Simply type my and press Tab to see available commands.
Updating Autocompletion
If you create new commands, regenerate the completion file:
# Regenerate autocompletion my completion > my-autocomplete.sh # Apply changes source ~/.zshrc # or source ~/.bashrc
💻 Development
Available Commands
| Command | Description |
|---|---|
my ai:ask |
Ask a question to OpenAI |
my ai:commit |
Generate a semantic commit message |
my ai:reset-key |
Reset your OpenAI API key |
my currency:convert |
Convert between currencies |
my docker:list |
List running Docker containers |
my docker:stop-all |
Stop all running Docker containers |
my env:set |
Set an environment variable |
my env:unset |
Unset an environment variable |
my git:soft-revert |
Soft revert Git changes |
my git:stash |
Stash Git changes |
my git:stash-restore |
Restore stashed Git changes |
my zip:all |
Zip the current directory |
Code Quality
# Fix code style issues make check # Run tests make test # Run tests with coverage report make coverage
Adding New Commands
- Create a new command class in the
src/Commanddirectory:
<?php namespace MyCommands\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class YourNewCommand extends Command { // Implement your command }
- Register your command in
bin/my.
📦 Publishing to Packagist
- Push your repository to a public hosting service like GitHub.
- Tag a release, for example
git tag v1.0.0 && git push --tags. - Create an account on Packagist and submit the repository URL.
- Once approved, users can install the package via Composer as shown above.
🤝 Contributing
Contributions are welcome and appreciated! Here's how you can contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
If you encounter any problems or have suggestions, please open an issue.
📝 License
This project is licensed under the MIT License.
Built with ❤️ by luizalbertobm
