Hmm, there are always several options for self-updating. I guess the first couple that come to mind are:
-
if you wanted to keep using Composer’s built-in features (like dependency checking, sub-project downloading, etc.), then you might be able to package the composer.phar file itself as part of the CLI package. Then, internally issue your updates commands to it. That way you still get all the benefits without having to ask the user to download and instal Composer. This could be neat and powerful, but it does create a dependency on Composer - which you’d have to keep updated in your own CLI package.
-
the CLI package could simply download the latest master directly from the GitHub account, and replace the necessary files - even using
wget
orcurl
if necessary. The biggest advantage of this is that it is a simpler solution, with basically no dependencies. The main disadvantage of doing this, is that unlike Composer, dependency checking would have to be done manually.
There may be dozens of other ways to do this, which may be even more efficient, but getting a self-updating system up-and-running quickly should not be too troublesome.