oihana/php-commands

The Oihana PHP Commands library

dev-main 2025-08-10 15:49 UTC

This package is auto-updated.

Last update: 2025-08-10 15:49:16 UTC


README

Oihana Php Core

An open-source PHP framework designed to create advanced command-line applications. Built on top of the Oihana PHP ecosystem, it provides ready-to-use tools to manage and automate common server and web application tasks.

πŸ“š Documentation

Full project documentation is available at:
πŸ‘‰ https://bcommebois.github.io/oihana-php-commands

πŸ“¦ Installation

Requires PHP 8.4+

Install via Composer:

composer require oihana/php-commands

✨ Features

With it, you can:

  • Manage MySQL databases β€” create users, grant privileges, perform backups, and restore.
  • Automate database & web app backups β€” schedule and run incremental or full backups.
  • Install & update applications β€” deploy, upgrade, and maintain web projects.
  • Manage caches β€” clear and control systems like Memcached and Redis.
  • Handle SSL certificates β€” automate Let’s Encrypt / Certbot renewal and installation.
  • Configure NGINX servers β€” generate modular configuration files and reload services.
  • And much more β€” from system maintenance scripts to environment setup.

The framework includes:

  • A modular Symfony Console integration for creating custom CLI commands.
  • Pre-built command modules for database, cache, web server, and certificate management.
  • A flexible options system for easy configuration and automation.
  • Extensible architecture for adding your own tasks and workflows.

Perfect for:

  • DevOps automation
  • Web hosting management
  • Deployment pipelines
  • Local and production environment setup

βœ… Running Unit Tests

To run all tests:

composer run-script test

To run a specific test file:

composer run test ./tests/oihana/date/TimeIntervalTest.php

🧾 License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

πŸ‘€ About the author

πŸ› οΈ Generate the Documentation

We use phpDocumentor to generate the documentation into the ./docs folder.

Usage

Run the command :

composer doc