Minicli is a minimalist, dependency-free framework for building CLI-centric PHP applications. It provides a structured way to organize your commands, as well as various helpers to facilitate working with command arguments, obtaining input from users, and printing colored output.
Dependency-free: What Does it Mean¶
What does it mean to be dependency-free? It means that you can build a functional CLI PHP application without dozens of nested user-land dependencies. The basic
minicli/minicli package has only testing dependencies (only installed when you clone Minicli for development), and a couple system requirements:
- PHP >= 7.3
ext-readlinefor obtaining user input
Apart from that, you'll need Composer to install and use Minicli.
There are mainly two ways to get started: you can choose to create a project from scratch, or you can use our application repository template, which sets up a minimal structure with Command Namespaces and Controllers.
Both methods are explained in detail in the Getting Started Guide.
Minicli has evolved a lot since that series was initially written, but that was the base for what Minicli is today.
The following tutorials on dev.to compose a series named "Building Minicli", where we created the first version of
minicli from scratch:
- Part 1: Bootstrapping a CLI PHP Application in Vanilla PHP [ minicli v.0.1.0 ]
- Part 2: Building minicli: Implementing Command Controllers [ minicli v.0.1.2 ]
- Part 3: Building minicli: Autoloading Command Namespaces [ minicli v.0.1.3 ]
- Part 4: Introducing minicli: a microframework for CLI-centric PHP applications
Created with Minicli¶
- Dolphin - a CLI tool for managing DigitalOcean servers with Ansible.