civicrm / civix
CiviCRM Extension CLI
Requires
- php: >=7.4.0
- civicrm/composer-compile-plugin: ~0.18
- civicrm/composer-downloads-plugin: ~2.1|^3
- civicrm/cv-lib: ~0.3.66
- civicrm/php-array-doc: ~1.0.0
- symfony/console: ^4|^5
- symfony/filesystem: ^4|^5
- symfony/process: ^4|^5
- symfony/templating: ^4|^5
- symfony/var-dumper: ^4|^5
- symfony/var-exporter: ^4.4|^5
- totten/license-data: dev-master
- totten/process-helper: ^1.0.1
- webmozart/glob: ^4.7
This package is auto-updated.
Last update: 2026-06-10 18:13:36 UTC
README
Civix is a command-line tool for building CiviCRM extensions. It is distributed as part of CiviCRM-Buildkit.
Requirements
- PHP 7.4+
- CiviCRM 5.x (Recommended: any release from the prior 12 months)
- (For MAMP, WAMP, XAMPP, etc) PHP command-line configuration (http://wiki.civicrm.org/confluence/display/CRMDOC/Setup+Command-Line+PHP)
- (For CentOS/RHEL) Compatible version of libxml2 (#19)
Download
civix is distributed in PHAR format, which is a portable executable file (for PHP). It should run on most Unix-like systems where PHP is installed.
Here are three quick ways to download it:
-
Download the latest release of
civix.phar(SHA256, GPG) and put it in the PATH. For example:sudo curl -LsS https://download.civicrm.org/civix/civix.phar -o /usr/local/bin/civix sudo chmod +x /usr/local/bin/civix
(Learn more: Install
civix.pharas system-wide tool (Linux/BSD/macOS)) -
Or... add
civixand other CiviCRM tools to a composer project (Drupal 9/10/11)composer require civicrm/cli-tools
(Learn more: Install
civix.pharas project tool (composer)) -
Or... use phar.io's
phiveinstaller to download, validate, and cache thecivix.pharfile.phive install totten/civix
(Learn more: Install
civix.pharas project tool (phive))
There are several more options for downloading civix. See also:
- Download URLs for alternate versions
- Comparison of install options
- Install
civixas a system-wide/standalone tool - Install
civixas a tool within another project
(🟢=Binary installs are generally recommended. 🟡=Source installs may require extra attention to local compatibility.)
Documentation
The CiviCRM Developer Guide includes tutorials for building extensions
For reference documentation, civix supports a "--help" option. For example, to get reference materials about the "generate:page" command, run:
civix generate:page --help
Development
If you are developing updates for civix.git, then see doc/develop.md. It discusses PHAR compilation, unit tests, and similar processes.