Table of Contents

Development Workflow Utilities

The following command line utilities support a development workflow, including version control, code generation and templates, and API CLI's.

It is assumed that you already have git installed.

PHP Composer

Confirm that the install location is in your $PATH.

export INSTALL_PATH='/usr/local/bin'

# download install-composer.php:
wget -q '' -O 'install-composer.php'

# install: verify install-composer.php
php install-composer.php --install-dir=$(INSTALL_PATH) --filename=composer

Confirm the install by running composer on the command line and you should see:

mzd☯ artichoke :>composer
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
Composer version 1.8.4 2019-02-11 10:52:10

  command [options] [arguments]


Download the PHP Archive. A CLI HTTP client like curl or wget is recommended.

curl -O

Copy the archive to a location in your $PATH.

mv wp-cli.phar /usr/local/bin/wp

And verify the install

wp --info


Download and put cv somewhere in your $PATH.

curl -O
chmod ugo+x cv.phar
mv cv.phar /usr/local/bin/cv

CiviCRM Extension Development Tool (Civix)

In CiviCRM plugins are called, Extensions. Yet, in the civix help, extensions are called "modules". For example: civix generate:module. (Don't ask me why, but CiviCRM was grounded in Drupal development for many years.)

Most circumstances call for extending CiviCRM by creating an extension, though other (historic) techniques also exist.

curl -o /usr/local/bin/civix
chmod +x /usr/local/bin/civix

Besides generating extension boilerplate, civix is often used to do the following:

  • create angular modules
  • create custom API end-points
  • create page, forms, and report templates.
  • add custom entries to the CiviCRM menu and routing