oihana/php-commands

The Oihana PHP Commands library

1.0.3 2025-08-13 10:50 UTC

This package is auto-updated.

Last update: 2025-08-13 14:59:39 UTC


README

Oihana PHP Commands

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.

Latest Version Total Downloads License

📚 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

Oihana PHP 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

Oihana PHP Memcached

CLI to control Memcached using the official Memcached PHP extension.

🔗 View the repository: https://github.com/BcommeBois/oihana-php-memcached

🌐 Nginx

Oihana PHP 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

Oihana PHP 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