Cli folder

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
vakil123
Joomla! Intern
Joomla! Intern
Posts: 50
Joined: Mon Jul 05, 2010 10:07 pm

Cli folder

Post by vakil123 » Tue Oct 11, 2011 12:26 am

I have suddenly found a new Cli folder in Joomla root along with all those administrator, components folders.

If I open this there is one single index.html file which is empty but the file size is 31 bytes.

Can anyone tell me if I should delete this file.

Thank you.

glens1234
Joomla! Explorer
Joomla! Explorer
Posts: 299
Joined: Tue Feb 19, 2008 8:13 pm

Re: Cli folder

Post by glens1234 » Tue Oct 11, 2011 2:32 pm

Sorry to bump an old post but i am curious about this as well. I have just downloaded 1.7 have this folder as well? Also, i can't find the configuration file. hmmm

mandingueiro
Joomla! Intern
Joomla! Intern
Posts: 90
Joined: Sat Jul 15, 2006 3:09 pm

Re: Cli folder

Post by mandingueiro » Mon Oct 24, 2011 3:42 pm

Same here. It was in the 1.7.0 to 1.7.2 patch.

Richard67
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 145
Joined: Fri Sep 16, 2011 6:13 pm
Location: Germany
Contact:

Re: Cli folder

Post by Richard67 » Fri Oct 28, 2011 12:47 pm

Hi,
have just noticed too this new cli folder.
I ask myself now if I shall add a disallow directive for it to the robots.txt, currently there is none.

dgdesign
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Jan 06, 2009 10:42 pm

Re: Cli folder

Post by dgdesign » Thu Nov 10, 2011 1:26 am

What is the "Cli" folder for?

DaReign
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Sep 07, 2011 4:01 pm

Re: Cli folder

Post by DaReign » Thu Nov 17, 2011 3:05 pm

Well nobody know what is this ?. Now i don't know if I was hacked or if it is something normal.

DaReign
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Sep 07, 2011 4:01 pm

Re: Cli folder

Post by DaReign » Thu Nov 17, 2011 3:11 pm

Does anybody of you use Ozio Gallery because I found this folder when I saw that this gallery stoped working and I don't know if it is coincidence.

User avatar
kenmcd
Joomla! Champion
Joomla! Champion
Posts: 5672
Joined: Thu Aug 18, 2005 2:09 am
Location: California
Contact:

CLI folder is for Command Line Interface applications

Post by kenmcd » Thu Nov 17, 2011 3:42 pm

.
The /cli/ folder was added in Joomla 1.7.1 for future use.

CLI folder is for Command Line Interface applications
See:

[#26793] Add joomlacms and cli folders
This is adding the scaffolding to prepare for CLI installations (from both
finder and extensions) and for the creation of CMS specific libraries.
http://joomlacode.org/gf/project/joomla ... m_id=26793

How to create a stand-alone application using the Joomla! Platform
http://docs.joomla.org/How_to_create_a_ ... !_Platform

Platform Examples Wiki - [#8888] FrontPage
We'll use this wiki for posting tips, tricks and advice about making platform applications.
http://code.joomla.org/gf/project/platf ... d_id=21692

Platform Examples
You can build all kinds of web and command line applications using the Joomla! Framework.
This project provides a place to share examples.
http://code.joomla.org/gf/project/platformapps/

Building on the Platform
http://community.joomla.org/blogs/commu ... tform.html


So most users can simply ignore the /cli/ folder.
.
██ LibreTraining

camsarim
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Wed Feb 10, 2010 11:57 pm
Contact:

Re: Cli folder

Post by camsarim » Mon Nov 21, 2011 5:18 am

Thanks so much. I was worrying about this too.

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 22157
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, The Netherlands
Contact:

Re: Cli folder

Post by pe7er » Mon Nov 21, 2011 10:59 am

[MOD note: moved from 1.5 to Joomla 1.7]
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Nederland
Co-developer of d2 Content https://data2site.com/joomla-extensions/d2-content

sando
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Jul 10, 2010 8:06 am

Re: Cli folder

Post by sando » Thu Feb 09, 2012 11:49 pm

Hi all.
The CLI is really great feature and this one is taking Joomla one step closer to a PHP framework not just CMS. I first saw the CLI feature at the Joomla Conference in London 2011 and I was amazed of what it can do. I actually started my own, I don't know how to name it, plugin called CLI Builder.

The idea is this script will allow to build blueprint plugin, component, module or template. All that through console interface by entering some necessary data like title, developer name and email etc.

Here is the code at GIT hub: https://github.com/corleonis/cli-builder

So if you're interested just browse it or if you feel more hacky fork it and feel free to modify it.

Note: this is still in development but it can generate a plugin and install it on your Joomla website which you can edit later.

DaReign
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Wed Sep 07, 2011 4:01 pm

Re: Cli folder

Post by DaReign » Fri Feb 10, 2012 7:58 am

How it works, I just only need to save that files in cli folder and open them in the browser?

mbabker
Joomla! Hero
Joomla! Hero
Posts: 2195
Joined: Sun Feb 28, 2010 8:26 pm

Re: Cli folder

Post by mbabker » Fri Feb 10, 2012 7:10 pm

CLI stands for "Command Line Interface".

These files are intended to be run from the command line (i.e. the Terminal window on Mac OS) and interface with your Joomla sites without needing all the resources of a full page request from a browser. Included are three scripts right now: One to run the Smart Search indexer, one to get rid of old cache data, and one to check for extension updates. These can be set up on your host to run as cron jobs.

By the way, you should not (and because of a simple check in each of the scripts, can not) run these from a browser.

User avatar
LukeDouglas
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 208
Joined: Sat Dec 08, 2007 8:23 pm

Re: Cli folder

Post by LukeDouglas » Thu Jan 31, 2013 2:56 am

Still a bit confused as to how this can be used if none of these should be run from a browser. I see an update_cron.php file. Can the files in the 'cli' folder be used to run joomla apps via cron jobs, ie: doing an Akeeba Backup on a schedule via a cron job?

mbabker
Joomla! Hero
Joomla! Hero
Posts: 2195
Joined: Sun Feb 28, 2010 8:26 pm

Re: Cli folder

Post by mbabker » Tue Feb 12, 2013 2:05 am

Yes, they can be used for cron jobs. I personally build various CLI scripts for tasks I'm working on in development and run them via the Terminal app in Mac OS. So long as you have a way to schedule cron jobs or execute scripts from the command line, you'll be able to execute these files. There are security checks in place to prevent their execution from the web, so you don't need to worry about this either.

waveywhite
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jan 28, 2010 8:33 am

Re: Cli folder

Post by waveywhite » Tue Jul 23, 2013 11:59 am

Out of interest - what is the check that means these scripts can't be run from the browser? I've been looking through the code and haven't found that check. If I'm writing my own CLI scripts I need to know if there's something I should to do to make this check happen.

waveywhite
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Jan 28, 2010 8:33 am

Re: Cli folder

Post by waveywhite » Tue Jul 23, 2013 12:05 pm

Just found the answer to my own question. The check is in JApplicationCli::_construct. All you have to do is derive from JApplicationCli, making sure you call parent::_construct(...) if you have a constructor in your derived class.


Locked

Return to “General Questions/New to Joomla! 2.5”