oihana / php-commands
The Oihana PHP Commands library
Requires
- php: >=8.4
- oihana/php-core: dev-main
- oihana/php-files: dev-main
- oihana/php-reflect: dev-main
- oihana/php-schema: dev-main
- oihana/php-standards: dev-main
- oihana/php-system: dev-main
- symfony/console: ^7.3
- symfony/lock: ^7.3
- symfony/string: ^7.3
- symfony/uid: ^7.3
Requires (Dev)
- mikey179/vfsstream: ^1.6
- nunomaduro/collision: ^8.8
- phpdocumentor/shim: ^3.8
- phpunit/phpunit: ^12
README
Build robust, scriptable command-line tooling for servers and web applications. Part of the Oihana PHP ecosystem, this package gives you a consistent foundation to automate day‑to‑day operations with confidence.
📚 Documentation
Full documentation: https://bcommebois.github.io/oihana-php-commands
📦 Installation
Requires PHP 8.4+. Install via Composer:
composer require oihana/php-commands
✨ What you can do
- Manage MySQL databases: create users, grant privileges, back up and restore data.
- Automate backups: schedule and execute incremental or full backups for databases and apps.
- Install and update applications: deploy, upgrade, and maintain projects reliably.
- Control caches: clear and manage systems like Memcached and Redis.
- Handle SSL certificates: automate issuance and renewal with Let’s Encrypt/Certbot.
- Configure NGINX: generate modular server configs and reload services.
Under the hood
- First‑class integration with Symfony Console for building custom CLI commands.
- Ready‑made plugins for databases, caches, web servers, certificates, and more.
- A flexible options system based on the PSR‑11 Container.
- An extensible architecture to add your own tasks, workflows, and plugins.
Ideal for DevOps automation, hosting management, CI/CD pipelines, and local or production environment setup.
🔌 Plugins
Each plugin extends the CLI with focused, production‑ready capabilities.
🔌 | Plugin | Description |
---|---|---|
🔏 | Oihana PHP Certbot | Create, modify and manage Let’s Encrypt certificates via Certbot. |
🧠 | Oihana PHP Memcached | Manage Memcached in‑memory key‑value caching. |
🌐 | Oihana PHP Nginx | Create, modify and control NGINX configurations and commands. |
🤖 | Oihana PHP Robots | Create or remove a robots.txt file from the CLI. |
🔏 Certbot

Toolkit to create, modify and manage Let’s Encrypt certificates via the Certbot CLI.
🔗 View the repository: https://github.com/BcommeBois/oihana-php-certbot
🧠 Memcached

CLI to control Memcached using the official Memcached PHP extension.
🔗 View the repository: https://github.com/BcommeBois/oihana-php-memcached
🌐 Nginx

Simple CLI to manage NGINX and create/remove configuration files on your server.
🔗 View the repository: https://github.com/BcommeBois/oihana-php-nginx
🤖 Robots

CLI to create or remove a website’s robots.txt
file.
🔗 View the repository: https://github.com/BcommeBois/oihana-php-robots
✅ Running tests
Run all tests:
composer test
Run a specific test file:
composer test ./tests/oihana/commands/ProcessTest.php
🛠️ Generate the documentation
We use phpDocumentor to generate documentation into the ./docs
folder.
composer doc
🧾 License
Licensed under the Mozilla Public License 2.0 (MPL‑2.0).
👤 About the author
- Author: Marc ALCARAZ (aka eKameleon)
- Email:
marc@ooop.fr
- Website:
https://www.ooop.fr
🔗 Related packages
oihana/php-core
– core helpers and utilities used by this library:https://github.com/BcommeBois/oihana-php-core
oihana/php-reflect
– reflection and hydration utilities:https://github.com/BcommeBois/oihana-php-reflect
oihana/php-system
– common helpers of the Oihana PHP framework:https://github.com/BcommeBois/oihana-php-system
oihana/php-schema
– object‑oriented implementation of the Schema.org vocabulary:https://github.com/BcommeBois/oihana-php-schema
oihana/php-standards
– constants and helpers based on major international standards (ISO, UN, UN/CEFACT, etc.):https://github.com/BcommeBois/oihana-php-standards