Scroll to navigation

ARC(1) User Commands ARC(1)

NAME

arc - arcanist, a code review and revision management utility

SYNOPSIS

arc command [options] [args] This help file provides a detailed command reference.

COMMAND REFERENCE

alias

alias command

alias command target -- [options]

Supports: cli Create an alias from command to target (optionally, with options). For example:

  arc alias fpatch patch -- --force

...will create a new 'arc' command, 'arc fpatch', which invokes 'arc patch --force ...' when run. NOTE: use "--" before specifying options!

If you start an alias with "!", the remainder of the alias will be invoked as a shell command. For example, if you want to implement 'arc ls', you can do so like this:

  arc alias ls '!ls'

You can now run "arc ls" and it will behave like "ls". Of course, this example is silly and would make your life worse.

You can not overwrite builtins, including 'alias' itself. The builtin will always execute, even if it was added after your alias.

To remove an alias, run:

  arc alias fpatch

Without any arguments, 'arc alias' will list aliases.

amend [--revision revision_id] [--show]

Supports: git, hg Amend the working copy, synchronizing the local commit message from Differential.

Supported in Mercurial 2.2 and newer.

Use the message from a specific revision. If you do not specify a revision, arc will guess which revision is in the working copy.

Show the amended commit message, without modifying the working copy.

anoid

There's only one way to find out...

backout

Reverts/backouts on a previous commit. Supports: git, hg

Command is used like this: arc backout <commithash> | <diff revision> Entering a differential revision will only work if there is only one commit associated with the revision. This requires your working copy is up to date and that the commit exists in the working copy.

bookmark [options]

bookmark name [start]

Supports: hg Alias for arc feature.

Sort branches by status instead of time.

With 'json', show features in machine-readable JSON format.

Include closed and abandoned revisions.

branch [options]

branch name [start]

Supports: git Alias for arc feature.

Sort branches by status instead of time.

With 'json', show features in machine-readable JSON format.

Include closed and abandoned revisions.

browse [options] path ...

browse [options] object ...

Supports: git, hg, svn Open a file or object (like a task or revision) in your web browser.

  $ arc browse README   # Open a file in Diffusion.
  $ arc browse T123     # View a task.
  $ arc browse HEAD     # View a symbolic commit.

Set the 'browser' value using 'arc set-config' to select a browser. If no browser is set, the command will try to guess which browser to use.

Default branch name to view on server. Defaults to "master".

Open arguments as paths, even if they do not exist in the working copy.

call-conduit method

Supports: http, https Allows you to make a raw Conduit method call:

  - Run this command from a working directory.
  - Call parameters are REQUIRED and read as a JSON blob from stdin.
  - Results are written to stdout as a JSON blob.

This workflow is primarily useful for writing scripts which integrate with Phabricator. Examples:

  $ echo '{}' | arc call-conduit conduit.ping
  $ echo '{"phid":"PHID-FILE-xxxx"}' | arc call-conduit file.download

close task_id [options]
Close a task or otherwise update its status.

Show available status options and exit.

Provide a comment with your status change.

Specify a new status. Valid status options can be seen with the `list-statuses` argument.

close-revision [options] revision

Supports: git, hg, svn Close a revision which has been committed (svn) or pushed (git, hg). You should not normally need to do this: arc commit (svn), arc amend (git, hg), arc land (git, hg), or repository tracking on the master remote repository should do it for you. However, if these mechanisms have failed for some reason you can use this command to manually change a revision status from "Accepted" to "Closed".

Close only if the repository is untracked and the revision is accepted. Continue even if the close can't happen. This is a soft version of '' used by other workflows.

Do not print a success message.

commit [--revision revision_id] [--show]

Supports: svn Commit a revision which has been accepted by a reviewer.

Commit a specific revision. If you do not specify a revision, arc will look for committable revisions.

Show the command which would be issued, but do not actually commit anything.

cover [--rev revision] [path ...]

Supports: svn, git, hg Cover your... professional reputation. Show blame for the lines you changed in your working copy (svn) or since some commit (hg, git). This will take a minute because blame takes a minute, especially under SVN.

Supports: git, hg Cover changes since a specific revision.

diff [paths] (svn)

diff [commit] (git, hg)

Supports: git, svn, hg Generate a Differential diff or revision from local changes.

Under git and mercurial, you can specify a commit (like HEAD^^^ or master) and Differential will generate a diff against the merge base of that commit and your current working directory parent.

Under svn, you can choose to include only some of the modified files in the working copy in the diff by specifying their paths. If you omit paths, all changes are included in the diff.

Automatically add all unstaged and uncommitted files to the commit.

Require excuse for lint advice in addition to lint warnings and errors.

Skip checks for untracked files in the working copy.

When linting git repositories, amend HEAD with all patches suggested by lint without prompting.

When linting git repositories, amend HEAD with autofix patches suggested by lint without prompting.

Apply patches suggested by lint to the working copy without prompting.

Supports: git, hg Additional rules for determining base revision.

After creating a diff or revision, open it in a web browser.

    0 to disable lint cache, 1 to enable (default).

When creating a revision, add CCs.

Always enable coverage information.

Always create a new revision.

Supports: git, hg When updating a revision under git, edit revision information before updating.

Attempt to convert non UTF-8 hunks into specified encoding.

Provide a prepared in advance excuse for any lints/tests shall they fail.

Supports: git Specify the end of the commit range. This disables many Arcanist/Phabricator features which depend on having access to the working copy.

Ignore unsound test failures without prompting.

Emit machine-readable JSON. EXPERIMENTAL! Probably does not work!

Normally, files are diffed with full context: the entire file is sent to Differential so reviewers can 'show more' and see it. If you are making changes to very large files with tens of thousands of lines, this may not work well. With this flag, a diff will be created that has only a few lines of context.

Raise all lint warnings, not just those on lines you changed.

When updating a revision, use the specified message instead of prompting.

When creating a revision, read revision information from this file.

Never apply patches suggested by lint.

Never amend commits in the working copy with lint patches.

Always disable coverage information.

Only run lint and unit tests. Intended for internal use.

Do not run lint.

Do not run unit tests.

Only generate a diff, without running lint, unit tests, or other auxiliary steps. See also --preview.

Display only lint messages not present in the original code.

Create or update a revision without requesting a code review.

Instead of creating or updating a revision, only create a diff, which you may later attach to a revision. This still runs lint unit tests. See also --only.

Read diff from stdin, not from the working copy. This disables many Arcanist/Phabricator features which depend on having access to the working copy.

Generate diff by executing a specified command, not from the working copy. This disables many Arcanist/Phabricator features which depend on having access to the working copy.

When creating a revision, add reviewers.

Do not upload binaries (like images).

Do not copy changes to the staging area.

Supports: hg Suppress warning about uncommitted changes.

Always update a specific revision.

Supports: git Read revision information from a specific commit.

Supports: hg, git When creating a revision, try to use the working copy commit message verbatim, without prompting to edit it. When updating a revision, update some fields from the local commit message.

download file [--as name] [--show]

Supports: filesystems Download a file to local disk, e.g.:

  $ arc download F33              # Download file 'F33'

Save the file with a specific name rather than the default.

Write file to stdout instead of to disk.

export [paths] format (svn)

export [commit_range] format (git, hg)

export --revision revision_id format

export --diff diff_id format

Supports: svn, git, hg Export the local changeset (or a Differential changeset) to a file, in some format: git diff (--git), unified diff (--unified), or arc bundle (--arcbundle path) format.

Export change as an arc bundle. This format can represent all changes. These bundles can be applied with 'arc patch'.

Instead of exporting changes from the working copy, export them from a Differential diff.

Attempt to convert non UTF-8 patch into specified encoding.

Export change as a git patch. This format is more complete than unified, but less complete than arc bundles. These patches can be applied with 'git apply' or 'arc patch'.

Instead of exporting changes from the working copy, export them from a Differential revision.

Export change as a unified patch. This format is less complete than git patches or arc bundles. These patches can be applied with 'patch' or 'arc patch'.

feature [options]

feature name [start]

Supports: git, hg A wrapper on 'git branch' or 'hg bookmark'.

Without name, it lists the available branches and their revision status.

With name, it creates or checks out a branch. If the branch name doesn't exist and is in format D123 then the branch of revision D123 is checked out. Use start to specify where the new branch will start. Use 'arc.feature.start.default' to set the default feature start location.

Sort branches by status instead of time.

With 'json', show features in machine-readable JSON format.

Include closed and abandoned revisions.

flag [object ...]

flag object --clear

flag object [--edit] [--color color] [--note note]

In the first form, list objects you've flagged. You can provide the names of one or more objects (Maniphest tasks T?[7m#, Differential revisions D?[m#, Diffusion references rXXX???, or PHIDs PHID-XXX-???) to print only flags for those objects.

In the second form, clear an existing flag on one object.

In the third form, create or update a flag on one object. Color defaults to blue and note to empty, but if you omit both you must pass --edit.

Delete the flag on an object.

Set the color of a flag.

Edit the flag on an object.

Set the note on a flag.

get-config [options] -- [name ...]

Supports: cli Reads an arc configuration option. With no argument, reads all options.

With --verbose, shows detailed information about one or more options.

Show detailed information about options.

help [command]

help --full

Supports: english Shows this help. With command, shows help about a specific command.

Print detailed information about each command.

install-certificate [uri]

Supports: http, https Installs Conduit credentials into your ~/.arcrc for the given install of Phabricator. You need to do this before you can use 'arc', as it enables 'arc' to link your command-line activity with your account on the web. Run this command from within a project directory to install that project's certificate, or specify an explicit URI (like "https://phabricator.example.com/").

land [options] [ref]

Supports: git, hg

Publish an accepted revision after review. This command is the last step in the standard Differential pre-publish code review workflow.

This command merges and pushes changes associated with an accepted revision that are currently sitting in ref, which is usually the name of a local branch. Without ref, the current working copy state will be used.

Under Git: branches, tags, and arbitrary commits (detached HEADs) may be landed.

Under Mercurial: branches and bookmarks may be landed, but only onto a target of the same type. See T3855.

The workflow selects a target branch to land onto and a remote where the change will be pushed to.

A target branch is selected by examining these sources in order:

  - the B<--onto> flag;
  - the upstream of the current branch, recursively (Git only);
  - the I<arc.land.onto.default> configuration setting;
  - or by falling back to a standard default:
    - "master" in Git;
    - "default" in Mercurial.

A remote is selected by examining these sources in order:

  - the B<--remote> flag;
  - the upstream of the current branch, recursively (Git only);
  - or by falling back to a standard default:
    - "origin" in Git;
    - the default remote in Mercurial.

After selecting a target branch and a remote, the commits which will be landed are printed.

With --preview, execution stops here, before the change is merged.

The change is merged with the changes in the target branch, following these rules:

In repositories with mutable history or with --squash, this will perform a squash merge (the entire branch will be represented as one commit after the merge).

In repositories with immutable history or with --merge, this will perform a strict merge (a merge commit will always be created, and local commits will be preserved).

The resulting commit will be given an up-to-date commit message describing the final state of the revision in Differential.

In Git, the merge occurs in a detached HEAD. The local branch reference (if one exists) is not updated yet.

With --hold, execution stops here, before the change is pushed.

The change is pushed into the remote.

Consulting mystical sources of power, the workflow makes a guess about what state you wanted to end up in after the process finishes and the working copy is put into that state.

The branch which was landed is deleted, unless the --keep-branch flag was passed or the landing branch is the same as the target branch.

Delete the feature branch in the remote after landing it.

Prepare the change to be pushed, but do not actually push it.

Keep the feature branch after pushing changes to the remote (by default, it is deleted).

Supports: git Perform a --no-ff merge, not a --squash merge. If the project is marked as having an immutable history, this is the default behavior.

Land feature branch onto a branch other than the default ('master' in git, 'default' in hg). You can change the default by setting 'arc.land.onto.default' with `arc set-config` or for the entire project in .arcconfig.

Prints the commits that would be landed. Does not actually modify or land the commits.

Push to a remote other than the default ('origin' in git).

Use the message from a specific revision, rather than inferring the revision based on branch content.

Perform a --squash merge, not a --no-ff merge. If the project is marked as having a mutable history, this is the default behavior.

Supports: git When updating the feature branch, use merge instead of rebase. This is the default behavior. Setting arc.land.update.default to 'merge' can also be used to make this the default.

Supports: git When updating the feature branch, use rebase instead of merge. This might make things work better in some cases. Set arc.land.update.default to 'rebase' to make this the default.

liberate [path]

Supports: libphutil Create or update a libphutil library, generating required metadata files like init.php.

Drop the module cache before liberating. This will completely reanalyze the entire library. Thorough, but slow!

Force the library map to be updated, even in the presence of lint errors.

Use a flag for library name rather than awaiting user input.

lint [options] [paths]

lint [options] --rev [rev]

Supports: git, svn, hg Run static analysis on changes to check for mistakes. If no files are specified, lint will be run on all files which have been modified.

When linting git repositories, amend HEAD with all patches suggested by lint without prompting.

When linting git repositories, amend HEAD with autofix patches suggested by lint without prompting.

Apply patches suggested by lint to the working copy without prompting.

    0 to disable cache, 1 to enable. The default value is
    determined by 'arc.lint.cache' in configuration, which defaults
    to off. See notes in 'arc.lint.cache'.

Override configured lint engine for this project.

Lint all files in the project.

Show all lint warnings, not just those on changed lines. When paths are specified, this is the default behavior.

Never apply patches suggested by lint.

Show lint warnings just on changed lines. When no paths are specified, this is the default. This differs from only-new in cases where line modifications introduce lint on other unmodified lines.

Supports: git, hg Display only messages not present in the original code.

Output the linter results to a file. Defaults to stdout.

With 'summary', show lint warnings in a more compact format. With 'json', show lint warnings in machine-readable JSON format. With 'none', show no lint warnings. With 'compiler', show lint warnings in suitable for your editor. With 'xml', show lint warnings in the Checkstyle XML format.

Supports: git, hg Lint changes since a specific revision.

Set minimum message severity. One of: 'advice', 'autofix', 'warning', 'error', 'disabled'. Defaults to 'advice'.

linters [options] [name]

Supports: cli List the available and configured linters, with information about what they do and which versions are installed.

if name is provided, the linter with that name will be displayed.

Search for linters. Search is case-insensitive, and is performedagainst name and description of each linter.

Show detailed information, including options.

list

Supports: git, svn, hg List your open Differential revisions.

paste [--title title] [--lang language] [--json]

paste id [--json]

Supports: text Share and grab text using the Paste application. To create a paste, use stdin to provide the text:

  $ cat list_of_ducks.txt | arc paste

To retrieve a paste, specify the paste ID:

  $ arc paste P123

Output in JSON format.

Language for syntax highlighting.

Title for the paste.

patch D12345

patch --revision revision_id

patch --diff diff_id

patch --patch file

patch --arcbundle bundlefile

Supports: git, svn, hg Apply the changes in a Differential revision, patchfile, or arc bundle to the working copy.

Apply changes from an arc bundle generated with 'arc export'.

Apply changes from a Differential diff. Normally you want to use --revision to get the most recent changes, but you can specifically apply an out-of-date diff or a diff which was never attached to a revision by using this flag.

Attempt to convert non UTF-8 patch into specified encoding.

Do not run any sanity checks.

Supports: git, hg Normally, a new branch (git) or bookmark (hg) is created and then the patch is applied and committed in the new branch/bookmark. This flag cherry-picks the resultant commit onto the original branch and deletes the temporary branch.

Supports: git, hg Normally under git/hg, if the patch is successful, the changes are committed to the working copy. This flag prevents the commit.

Apply changes from a git patchfile or unified patchfile.

Apply changes from a Differential revision, using the most recent diff that has been attached to it. You can run 'arc patch D12345' as a shorthand.

Supports: git, hg Normally, if a patch has dependencies that are not present in the working copy, arc tries to apply them as well. This flag prevents such work.

Supports: git, svn, hg Update the local working copy before applying the patch.

revert Please use arc backout instead

set-config [options] -- name value

Supports: cli Sets an arc configuration option.

Options are either user (apply to all arc commands you invoke from the current user) or local (apply only to the current working copy). By default, user configuration is written. Use --local to write local configuration.

User values are written to '~/.arcrc' on Linux and Mac OS X, and an undisclosed location on Windows. Local values are written to an arc directory under either .git, .hg, or .svn as appropriate.

Set a local config value instead of a user one.

shell-complete --current N -- [argv]

Supports: bash, etc. Implements shell completion. To use shell completion, source the appropriate script from 'resources/shell/' in your .shellrc.

Current term in the argument list being completed.

start object

Start tracking work in Phrequent.

stop [--note note] [objects]

Stop tracking work in Phrequent.

A note to attach to the tracked time.

tasks [options]
View all assigned tasks.

Limit the amount of tasks outputted, default is all.

Arrange tasks based on priority, created, or modified, default is priority.

Only show tasks assigned to the given username, also accepts @all to show all, default is you.

Show tasks that are open or closed, default is open.

Only show tasks that are not assigned (upforgrabs).

time

Show what you're currently tracking in Phrequent.

todo summary [options]
Quickly create a task for yourself.

After creating the task, open it in a web browser.

Other users to CC on the new task.

Projects to assign to the task.

unit [options] [paths]

unit [options] --rev [rev]

Supports: git, svn, hg Run unit tests that cover specified paths. If no paths are specified, unit tests covering all modified files will be run.

Always enable coverage information.

Show a detailed coverage report on the CLI. Implies --coverage.

Override configured unit engine for this project.

Run every test.

Report results in JSON format.

Always disable coverage information.

With 'full', show full pretty report (Default). With 'json', report results in JSON format. With 'ugly', use uglier (but more efficient) JSON formatting. With 'none', don't print results.

Supports: git, hg Run unit tests covering changes since a specific revision.

    (PROTOTYPE) Record a copy of the test results on the specified

Harbormaster build target.

With --json, use uglier (but more efficient) formatting.

upgrade

Supports: cli Upgrade arcanist and libphutil to the latest versions.

upload file [file ...] [--json]

Supports: filesystems Upload a file from local disk.

Output upload information in JSON format.

Mark the file as temporary. Temporary files will be deleted automatically after 24 hours.

version [options]

Supports: cli Shows the current version of arcanist.

which [options] (svn)

which [options] [commit] (hg, git)

Supports: svn, git, hg Shows which repository the current working copy corresponds to, which commits 'arc diff' will select, and which revision is in the working copy (or which revisions, if more than one matches).

Show committed and abandoned revisions.

Supports: git, hg Additional rules for determining base revision.

Supports: git Specify the end of the commit range to select.

Supports: git, hg Print base commit only and exit.

OPTION REFERENCE

Debugging command. Shows underlying commands as they are executed, and full stack traces when exceptions are thrown.

Output in plain ASCII text only, without color or style.

Use formatting even in environments which probably don't support it. Example: arc --ansi unit | less -r

Ignore libraries listed in .arcconfig and explicitly load specified libraries instead. Mostly useful for Arcanist development.

Ignore configured Conduit URI and use an explicit one instead. Mostly useful for Arcanist development.

Ignore configured credentials and use an explicit API token instead.

Ignore software version and claim to be running some other version instead. Mostly useful for Arcanist development. May cause bad things to happen.

Override the default Conduit timeout. Specified in seconds.

Specify a runtime configuration value. This will take precedence over static values, and only affect the current arcanist invocation.

Skip the working copy configuration file

Use provided file instead of ~/.arcrc.

2016-10-24