JApplicationCli and Drush

416 views
Skip to first unread message

Pastor Dan

unread,
Apr 30, 2012, 11:29:50 PM4/30/12
to joomla-de...@googlegroups.com
Drupal has a fantastic command-line interface called Drush (http://drush.ws). It seems to me that a major use of JApplicationCli in Joomla could be to enable a similar functionality. Basically, allow installation, upgrades, enabling/disabling of extensions, permission changes and so forth on Joomla sites via the command line. This would allow a developer to maintain many Joomla sites with a minimum of effort. Yet, I see almost nothing written about this. It seems most view the platform as a vehicle for building apps that have nothing to do with the CMS. What is the potential for building Drush-like functionality with JApplicationCli? It would be great if someone more knowledgeable than I could build some example Cli apps that allow you to perform at least some of the Drush functions on Joomla. If I am missing some information on this, please point me in the right direction.

Andrew Eddie

unread,
Apr 30, 2012, 11:55:34 PM4/30/12
to joomla-de...@googlegroups.com
Interesting questions.

The quick answer is yes, JApplicationCli is what you'd use to build
the Joomla equivalent to Drush, but I probably wouldn't design Joosh
(?) like Drush.

What we are doing at eBay, for a project, is designing a web services
platform for next-gen sites, but we have a command line interface for
that platform as well. For example, the let's say the API for getting
an article (as a json string) is:

http:://api.url/article/123

We've made it so you can invoke that from the command line as well, like this:

$ services /v1/json/article/123

Where "v1" is the API version and "json" is the return format. The
CLI is just a proxy to the same/similar route to load the same
controller that the web service would load (two birds with one stone).

That's what I'd do if I was designing a new project or thinking about
the future of Joomla as a content delivery platform. As for
retrofitting the existing CMS with a CLI goes, that would be a big
job.

Regards,
Andrew Eddie

Chris Davenport

unread,
May 1, 2012, 2:37:43 AM5/1/12
to joomla-de...@googlegroups.com
This is one of the reasons why we are trying to form a Web Services Working Group, to try to rally people to create just such a feature.

http://docs.joomla.org/Production_Working_Groups#Web_Services_Working_Group

Chris.
--
Chris Davenport
Joomla Leadership Team - Production Working Group
Joomla Documentation Coordinator

Pastor Dan

unread,
May 1, 2012, 4:36:14 PM5/1/12
to joomla-de...@googlegroups.com
I have since found this JApplicationCli extension installer script at  https://github.com/pasamio/joomla-cli-apps . This is exactly what I had in mind and works quite well utilizing the Joomla installer. Anybody know of any other similar scripts hidden away somewhere?

I realize that reproducing all CMS functions with a CLI would be very difficult. My interest is in creating a limited set of CLI functions that would allow remote maintenance of multiple sites in an automated fashion.

I wonder if Jentla works with a custom-built CLI interface. Anyone at liberty to discuss in broad strokes how it works?
Reply all
Reply to author
Forward
0 new messages