Skip to content

2. Available Commands

Mark Hamstra edited this page Mar 31, 2015 · 14 revisions

When you have Gitify installed, you can use Gitify list to get an overview of all available commands, and Gitify help [command] to get more information about that specific command.

Available commands:
  build          Builds a MODX site from the files and configuration.
  extract        Extracts data from the MODX site, and stores it in human readable files for editing and committing to a VCS.
  help           Displays help for a command
  init           Generates the .gitify file to set up a new Gitify project. Optionally installs MODX as well.
  list           Lists commands
install
  install:modx   Downloads, configures and installs a fresh MODX installation.
  install:package Downloads and installs a Modx Package

Gitify build

Used to read the data files, and write them to the MODX database. Note that this reads the .gitify file to see what needs to be built; it doesn't blindly try to write any file it encounters.

Usage:
 build [--skip-clear-cache] [-f|--force] [--no-backup]

Options:
 --skip-clear-cache    When specified, it will skip clearing the cache after building.
 --force (-f)          When specified, all existing content will be removed before rebuilding. Can be useful when having dealt with complex conflicts.
 --no-backup           When using the --force attribute, Gitify will automatically create a full database backup first. Specify --no-backup to skip creating the backup, at your own risk.
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.

Gitify extract

Used to read stuff from the MODX database, and turn it into majestic YAML data files.

Usage:
 extract

Options:
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.

Gitify init

Used to create a .gitify file in the current directory. Interactively allows you to set up a basic configuration, and also prompts to install MODX if it's not yet present.

Usage:
 init [--overwrite]

Options:
 --overwrite           When a .gitify file already exists, and this flag is set, it will be overwritten.
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.

Gitify install:modx

Installs the latest version of MODX, or the one you specified, by downloading the zip and running a command line install. Database details and the likes will be asked for interactively.

Usage:
 install:modx [modx_version]

Arguments:
 modx_version          The version of MODX to install, in the format 2.3.2-pl. Leave empty or specify "latest" to install the last stable release.

Options:
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.

Gitify install:package

Installs the last version of a MODX Package with the PackageName you specified, or all packages defined in your .gitify file when specifying the --all flag.

Usage:
 install:package [--all] [-i|--interactive] [package_name]

Arguments:
 PackageName          The MODX Package to install. Installs the last stable release of the Package.

Options:
 --all                 When specified, all packages defined in the .gitify config will be installed.
 --interactive (-i)    When --all and --interactive are specified, all packages defined in the .gitify config will be installed interactively. Installing a single package is always done interactively. 
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.

Gitify backup

Added in 0.7. Creates a backup of your full MySQL database. The backup will be written to the directory specified by the backup_directory option in your .gitify file.

Usage:
 backup [name]

Arguments:
 name                  Optionally the name of the backup file, useful for milestone backups. If not specified the file name will be a full timestamp.

Options:
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.

Gitify restore

Added in 0.7. Restores your MySQL database from a backup created with Gitify backup. Specify "last" to use the most recent backup.

Usage:
 restore [file]

Arguments:
 file                  The file name of the backup to restore; if left empty you will be provided a list of available backups. Specify "last" to use the last backup, based on the file modification time.

Options:
 --help (-h)           Display this help message.
 --verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
 --version (-V)        Display the Gitify version.