clic
User-friendly PHP application deployment and set-up., (*1)
clic
keeps track of applications and their configuration parameters, helps with setting up deploy keys for private
git repositories, and helps with publishing the application by linking the application to a publically accessible location., (*2)
License
clic
is licensed under the terms of the MIT license., (*3)
See the license.md file for a full copy of the license., (*4)
Installation
Option 1: As a phar file (with phar-composer)
The preferred way to install clic
is with the phar-composer
tool.
You will first need to install phar-composer. It is a very useful tool
that allows you to create runnable phar files from Composer packages., (*5)
If you have phar-composer installed, you can run:, (*6)
sudo phar-composer install vierbergenlars/clic
to have it build and install the phar file in your $PATH
, which allows you to run it as clic
from the commandline., (*7)
Or you can run, (*8)
phar-composer build vierbergenlars/clic
and copy the resulting phar file manually to where you want it., (*9)
Option 2: As a phar file (download)
If you do not want to install phar-composer, you can download the clic.phar
file from the latest release., (*10)
Don't forget to make the file executable with chmod +x clic.phar
and move it somewhere within your $PATH
., (*11)
Option 3: As a global composer installation
clic
can be installed with composer., (*12)
composer global require vierbergenlars/clic
You can use this to install CLI utilities globally, all you need
is to add the COMPOSER_HOME/vendor/bin
dir to your PATH
env var., (*13)
COMPOSER_HOME is c:\Users\<user>\AppData\Roaming\Composer
on Windows
and /home/<user>/.composer
on unix systems., (*14)
Option 4: From source
clic
can also be installed by downloading and extracting an archive or cloning the repository., (*15)
Next, run a composer install
within the application's directory to install dependencies., (*16)
Finally, add the bin/
folder to your PATH
, or to symlink bin/clic
to a folder in your PATH
., (*17)
Initial configuration
Initial configuration and setup of directories are set up with clic config:init
, (*18)
Global configuration is stored in ~/.clic-settings.json
(or the file referred to with the --config
option)
More information about the file format is available in the documentation,
though you probably do not need to edit this file manually., (*19)
Usage
You clone/extract applications from a repository or tarball. Then a script to complete the install and enter configuration
parameters is launched as defined in the applications' .cliconfig.json
file.
The application may then be made publicly accessible by adding vhost that refers to the application. This is a symlink
that has the applications' web-dir
as target. This way files that should not be publicly accessible are kept out of
the document root., (*20)
Applications
Commands to manipulate applications are available within the application
namespace, (*21)
application:add Add an existing application
application:clone Create a new application from remote repository
application:execute Executes application scripts
application:extract Create a new application from an archive
application:list Lists all applications
application:override Changes the configuration file for an application
application:remove Removes an application
application:show Shows application information
application:variable:get Shows variable value for an application
application:variable:set Sets variable value for an application
Details are available in the application section of the documentation, (*22)
Vhosts
Commands to manipulate vhosts are available within the vhost
namespace., (*23)
vhost:add Add web-accessible entrypoint to an application
vhost:disable Disables one or more vhosts
vhost:enable Enables one or more vhosts
vhost:fix Fixes one or more vhosts
vhost:list Lists all vhosts
vhost:remove Remove web-accessible entrypoint to an application
vhost:show Shows vhost information
Details are available in the vhost section of the documentation, (*24)
Repositories
Ssh deploy keys for private repositories can also be managed with clic
. They are available in the repository
namespace., (*25)
repository:add Add deploy key to a repository
repository:generate-key Generates deploy key to a repository
repository:list Lists all repositories
repository:remove Remove deploy key from a repository
repository:show Shows repository information
Details are available in the repository section of the documentation, (*26)
Configuration
All configuration parameters can be manipulated with the commands in the config
namespace.
These are low-level commands, most of the time higher-level commands are used to manipulate these values., (*27)
config:get Shows configuration value
config:init Initialize configuration
config:set Sets configuration values
config:unset Removes configuration values
Details are available in the config section of the documentation, (*28)
License
MIT, (*29)