Grav GPM - Grav

What is GPM?

GPM isGrav Package Manager which is used to install, update, uninstall and list the available plugins on the Grav repository. Similar to the CLI, GPM also executes the commands using command line interface such as terminal or cmd.
Use cmd to access on Windows, Terminal on Mac and shell on Linux. In Windows, as you can't use UNIX style commands, install the msysgit package which provides GIT and GIT BASH and provides UNIX style commands on Windows.
To list the available commands on the Grav repository type the command as −
This is what you get
commands
To get help on the commands, add help to the line as shown below −
You can find the version of PHP on the command line interface by using the following command −
php

How Does it work?

On running the commands on the CLI, GPM automatically downloads the required data from the GetGrav.org site. That is, all the details of available packages are downloaded and it determines what packages need to be installed and what need to be updated.
When you are downloading the packages from the repository, the Grav repository gets cached locally and all request after the cache has been generated will be handled by the local repository rather than the GetGrav.org server .
Some commands come with the --force (-f) option, which forces to re-fetch the repository. Using this option, there is no need to wait for 24 hours cycle before cache gets cleared.

What are some of the Commands?

The packages are downloaded from the Grav repository using some commands. To make use of the command, open your terminal and navigate to your root of the Grav folder and type as bin/gpm <command>.

Index

The index command is used to list the available plugins, themes in the Grav repository. Use the below command
index
Each line defines the name of the plugin or theme, slug, version of plugin or theme and also displays whether it is installed or not.

Info

The info command is used to display the information about package such as author, version, date and time of last updated, repository of package, download link of package, license information etc.
info

Install

The install command installs the required resources for the package from the Grav repository.
Use the following command to install the required package.
install
If you try to install an already installed package, then it informs what to do next.
install
If you type Y, it will overwrite on an already installed package and if you type N, it will abort the installation process.

Update

The update command informs about the package that need to be updated. If all packages are up to date, then it will say nothing to update.
update

Self-upgrade

The self-upgrade command is used to upgrade the Grav to the latest version. Use the following command to upgrade the Grav.

If you are using the latest version of Grav, then it will display a message saying "You are already running the latest version of Grav" along with the date of release and the time as shown in the screen.

self upgrade

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Grav Topics