J4.x

CLI Update: Difference between revisions

From Joomla! Documentation

No edit summary
No edit summary
Line 22: Line 22:
In this section we will talk about the usage of commands, we will talk about different commands, what they are and how you can use them. We will go by checking out available commands in the CLI Update.
In this section we will talk about the usage of commands, we will talk about different commands, what they are and how you can use them. We will go by checking out available commands in the CLI Update.
===Available commands===
===Available commands===
There are quite a number of commands available in the CLI Update that ready for use, these commands are grouped based on the area of the Joomla! CMS that they are touching.
====Checking for Updates Updates====
====Checking for Updates Updates====
The CLI Update provides a command to check for Joomla! updates, it works just like the web version of <tt>com_joomlaupdate</tt>, it retrieves update and tells if update is available or not. To run the update check, we will just issue the command like this from the root directory:<br/><br/>
<tt>php cli/joomla.php check-updates</tt>
<br/> <br/>
The command runs and the output displays an available update version, if available, or tell otherwise that the current installation is up to date.
====Extension commands:====  
====Extension commands:====  
The next group of commands are the extension based commands, simply put, the commands allows us to manage extensions within the Jommla! core, the CLI Update ships with commands to install, list and remove extensions.
======Listing installed extensions======
======Listing installed extensions======
This command allows us to list all installed extensions. This command can run in two different ways which are:
*General Listing
*General Listing
Lists all the extensions installed, by extensions it means components, languages, plugins, modules will be listed together when you run this command. This is how you call the command:<br/></br/>
<tt>php cli/joomla.php extension:list</tt/>
<br/></br/>
*Listing By types
*Listing By types
General listing of extension can be tedious if you're looking for a particular extension out of the big list, however, you can beat down the numbers specifying the type of extensions you can the command to display by adding a type option to the command. Here is how that is done: <br/></br/>
<tt>php cli/joomla.php extension:list --type=component</tt>
<br/></br/>
This will list out only component based extensions, you can specify type as module, plugin and language as well.
======Installing an Extension======
======Installing an Extension======
*Installing from URL
*Installing from URL

Revision as of 20:29, 26 July 2018

GSoC 2018
CLI Update
Documentation
Joomla! 
4.x

Introduction

Performing some minor task on the Joomla! administrator dashboard might seem cumbersome and slow. The CLI Update is introducing a faster way to perform some of these operations through the command line. It brings forward a way to integrate things faster in the Joomla! app. With it, small tests can be done faster without having to go through the process of the web dashboard. It a CLI Application to the Joomla! CMS that enables user to perform updates in the CMS.

This documentation shows how the CLI Update can be used and how you can extend it's functionality as a developer.

Requirements

As it goes for all CLI (Command Line Interface) Apps, access to a to your Joomla! installation via the command line is very important to use the tools provided by the CLI Update. You might want to consider having an SSH access for your live server.

Terms and definitions

  • CLI - Command Line Interface
  • SSH - Secure SHell

Using the CLI Update

In other for you to use the tools provided by CLI Update, as said in former section, you need access to a CLI into the root of the Joomla Installation. In other words you have to be in the root folder of your Joomla CMS as all commands will run from the root folder.

%To include an Image here%

General Command Usage

In this section we will talk about the usage of commands, we will talk about different commands, what they are and how you can use them. We will go by checking out available commands in the CLI Update.

Available commands

There are quite a number of commands available in the CLI Update that ready for use, these commands are grouped based on the area of the Joomla! CMS that they are touching.

Checking for Updates Updates

The CLI Update provides a command to check for Joomla! updates, it works just like the web version of com_joomlaupdate, it retrieves update and tells if update is available or not. To run the update check, we will just issue the command like this from the root directory:

php cli/joomla.php check-updates

The command runs and the output displays an available update version, if available, or tell otherwise that the current installation is up to date.

Extension commands:

The next group of commands are the extension based commands, simply put, the commands allows us to manage extensions within the Jommla! core, the CLI Update ships with commands to install, list and remove extensions.

Listing installed extensions

This command allows us to list all installed extensions. This command can run in two different ways which are:

  • General Listing

Lists all the extensions installed, by extensions it means components, languages, plugins, modules will be listed together when you run this command. This is how you call the command:

php cli/joomla.php extension:list

  • Listing By types

General listing of extension can be tedious if you're looking for a particular extension out of the big list, however, you can beat down the numbers specifying the type of extensions you can the command to display by adding a type option to the command. Here is how that is done:

php cli/joomla.php extension:list --type=component

This will list out only component based extensions, you can specify type as module, plugin and language as well.

Installing an Extension
  • Installing from URL
  • Installing from a PATH
Removing an extension

Updating the Joomla! Core

Installing Joomla! via the CLI

Interactive installation
Non-interactive Installation

Configuration based commands

Setting configurations
Getting configurations
Getting grouped configurations

Site down and Site up commands

Contributing to CLI Update as a developer

Adding more commands

Calling other commands within command classes