|Group||Application User Guides|
Guide to Arcanist, a command-line interface to Phabricator.
Arcanists provides command-line access to many Phabricator tools (like Differential, Files, and Paste), integrates with static analysis ("lint") and unit tests, and manages common workflows like getting changes into Differential for review.
A detailed command reference is available by running arc help. This document provides an overview of common workflows and installation.
Arcanist has technical, contributor-focused documentation here: http://www.phabricator.com/docs/arcanist/
A quick start guide is available at Arcanist Quick Start. It provides a much more compact summary of how to get arc set up and running for a new project. You may want to start there, and return here if you need more information.
Arcanist is a wrapper script that sits on top of other tools (e.g., Differential, linters, unit test frameworks, git, Mercurial, and SVN) and provides a simple command-line API to manage code review and some related revision control operations.
For a detailed list of all available commands, run:
$ arc help
For detailed information about a specific command, run:
$ arc help <command>
Arcanist allows you to do things like:
Once you've configured lint and unit test integration, you can also:
Arcanist integrates with other tools:
Arcanist has some advanced features as well, you can:
Except where otherwise noted, these workflows are generally agnostic to the underlying version control system and will work properly in git, Mercurial, or SVN repositories.
Arcanist is meant to be installed on your local machine or development server -- whatever machine you're editing code on. It runs on Linux, Mac OS X (see Arcanist User Guide: Mac OS X), and Windows (see Arcanist User Guide: Windows).
Arcanist is written in PHP, so you need to install the PHP CLI first if you don't already have it. Arcanist should run on PHP 5.2 and newer. If you don't have PHP installed, you can download it from http://www.php.net/.
To install Arcanist, pick an install directory and clone the code from GitHub:
some_install_path/ $ git clone git://github.com/facebook/libphutil.git some_install_path/ $ git clone git://github.com/facebook/arcanist.git
This should leave you with a directory structure like this
some_install_path/ # Wherever you chose to install it. arcanist/ # Arcanist-specific code and libraries. libphutil/ # A shared library Arcanist depends upon.
Now add some_install_path/arcanist/bin/ to your PATH environment variable. When you type "arc", you should see something like this:
Usage Exception: No command provided. Try 'arc help'.
If you get that far, you've done things correctly. If you get an error or have trouble getting this far, see these detailed guides:
You can later upgrade Arcanist and libphutil to the latest versions with arc upgrade:
$ arc upgrade
Arcanist changes quickly, so it can be something of a headache to get it installed and keep people up to date. Here are some approaches you might be able to use:
If you use bash, you can set up tab completion by adding something like this to your .bashrc, .profile or similar:
Some Arcanist commands can be configured. This configuration is read from several sources:
The first place where the setting is defined wins.
Existing settings can be printed with arc set-config --show.
Advanced topics are also available. These are detailed guides to configuring technical features of arc that refine its behavior. You do not need to read them to get it working.