1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Enhanced CLI Tools

Discussion in 'XenForo Suggestions' started by Teapot, Sep 6, 2014.

  1. Teapot

    Teapot Well-Known Member

    A lot of development is moving beyond the tools found in yesteryear - developers are often using tools like continuous integration services (Jenkins,Bamboo, etcetera), build tools (Grunt, Gulp, etcetera), automation/deployment tools (Puppet, Chef, Capistrano, etcetera), and so much more to work with their sites and speed up development.

    Unfortunately, all these share the same problem for XF: there's no way for any of these to control XenForo in any form other than the most rudimentary or hacky workarounds. For example, I'd love to set up an agile, one-click-deployable system for rolling out add-on updates to my site as I write them. I'd love to commit to master, and have Jenkins or something similar update the add-on repository on the server, then upgrade from the XML.

    In my opinion, the best and most accessible way to manipulate the XenForo install - whether this be part of a full-scale API (ideally) or a separate feature - would be to provide a CLI-bsaed endpoint, in a very similar fashion to how the CLI installer/upgrader currently works.

    For example, to achieve my earlier use case, I could set up my tools to call php -f xenforo/library/cli.php --upgrade-addon xenforo/library/MyCoolAddon/addon.xml, and have it go through the process of upgrading and rebuilding in the CLI.

    A non-exhaustive list of things I think this should be able to do are:
    • Install, uninstall, upgrade add-ons
    • Enable and disable add-ons
    • Move the site in and out of maintenance mode (with definable reason)
    • Rebuild caches
    • Trigger cron jobs
    • Display statistics regarding the XenForo installation - most importantly, the XF version, but perhaps the PHP or MySQL versions too, or the numbers of users/discussions/posts.
    maszd, gldtn, Jarod and 15 others like this.
  2. allewreK

    allewreK Active Member

  3. Teapot

    Teapot Well-Known Member

    maszd, gldtn, NixFifty and 1 other person like this.

Share This Page