How to write cli command


Hello, I would like to use hoa cli, but the documentation is a bit basic. So I would like to have a basic start, and from this I can complete a bit the documentation



Hello :-),

Do you want to write a CLI command for an Hoa library?


No for a specific project


Hoa\Cli is a framework to write CLI for Hoa’s libraries. If you write a library that fits Hoa’s conventions, then you can use Hoa\Cli, then you can develop it yourself. This is very basic. All it does is summed up in this file:


The idea is to write cli tools with several commands. I was hoping to use hoa cli (to try it) but if it’s for internal tools only let’s forget it.


Then simply clone Cli/Bin/Hoa.php. It contains a router and a dispatcher. Everything else is like regular Hoa’s commands.


thanks for the answer