Skip to content

twomice/civix

 
 

Repository files navigation

Civix is a command-line tool for building CiviCRM extensions.

Requirements

Unix/Mac Installation (Tarball)

Navigate to https://sourceforge.net/projects/civix/files/ and download a tarball (e.g. civix-X.Y.Z.tar.bz2).

cd $HOME

tar xvjf civix-X.Y.Z.tar.bz2
mv civix-X.Y.Z civix

# Add civix to the PATH; consider updating ~/.bashrc or ~/.profile
export PATH=$HOME/civix:$PATH

Unix/Mac Installation (Git/Composer)

cd $HOME

# If you haven't already, install the PHP tool "composer"
curl -s http://getcomposer.org/installer | php

# Download civix and dependencies
git clone git://github.com/totten/civix.git
cd civix
php $HOME/composer.phar install

# Add civix to the PATH; consider updating ~/.bashrc or ~/.profile
export PATH=$HOME/civix:$PATH

Windows Installation

# Install composer
In a browser, visit http://getcomposer.org
Click on the download button.
Scroll down to Windows Installer and click on Composer-Setup.exe.
Choose Run when prompted.

# Install git
If you don't already have git, then in a browser visit http://git-scm.com/download/win.
Choose Run when prompted.
Leave all the defaults.

# Download civix
Decide where you want to install civix. You might want to put it in C:\Program Files, but you might get hassled about admin rights, in which case you can pick somewhere else, like C:\users\<your name>.
From the start menu choose All Programs -> Git -> Git Bash.
In the window that appears, type:
  cd "/c/users/<your name>"
  (note the forward slashes)
git clone git://github.com/totten/civix.git
exit

# Download dependencies
In windows explorer, navigate to C:\users\<your name> (or whereever you installed civix).
Shift-right-click on the civix folder.
Choose open command window here.
In the window that appears, type:
  composer install

# Add civix to the PATH
Either temporarily add it:
set PATH=%PATH%;C:\users\<your name>\civix

OR permanently:
Start Menu -> Control Panel -> System -> Advanced -> Environment Variables

Upgrade

To upgrade civix and its dependencies, one can normally do:

cd $HOME/civix
git pull
php $HOME/composer.phar install

On some occasions, changes in civix, in a dependency, or in composer can break the upgrade. If this happens, then try deleting the dependencies and re-installing them:

php $HOME/composer.phar self-update
cd $HOME/civix
git pull
rm -rf vendor
php $HOME/composer.phar install

Documentation

The CiviCRM wiki includes tutorials for building extensions. See:

http://wiki.civicrm.org/confluence/display/CRMDOC/Create+an+Extension

For reference documentation, civix supports a "--help" option. For example, to get reference materials about the "generate:page" command, run:

civix generate:page --help

About

CiviCRM Extension Builder

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 88.2%
  • CSS 10.4%
  • Shell 1.2%
  • Other 0.2%