Skip to main content

phable

Manage Phabricator tasks from the comfort of your terminal.

phable is a CLI allowing you to manage your Phorge/Phabricator tasks.

It tries to be very simple and not go overboard with features. You can:

  • create a new task
  • display a task details
  • move a task to a column on its current board
  • assign a task to a user
  • add a comment to a task
  • and more (see phable --help output for the full feature list)

Installation

$ pip install phable-cli

Usage

$ phable --help
Usage: phable [OPTIONS] COMMAND [ARGS]...

  Manage Phabricator tasks from the comfort of your terminal

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  assign              Assign one or multiple task ids to a username
  cache               Manage internal cache
  comment             Add a comment to a task
  config              Manage phable config
  create              Create a new task
  edit                Edit the description text of the argument task
  list                Lists and filter tasks
  move                Move one or several task on their current project board
  move-project-tasks  Move tasks from the previous milestone to the new one while keeping their column.
  parent              Manage task parents
  report-done-tasks   Print the details of all tasks in the `from` column and move them to the `to` column.
  set                 Set the fields of one or multiple tasks
  show                Show task details
  subscribe           Subscribe to one or multiple task ids

A few examples:

$ phable list --status open
$ phable list --status progress --status stalled --milestone

--status can be passed multiple times to match several statuses.

Setup

For phable to work, you need to define the following configuration, by running $EDITOR $(phable config show):

[phabricator]
url = # URL to your phabricator instance. Ex: `url = https://phabricator.wikimedia.org`
token = # API token. Generate a token from ${PHABRICATOR_URL}/settings/user/${YOUR_USERNAME}/page/apitokens/
default_project_phid = # id for the Phabricator project to be used by default when creating tasks.

To get default_project_phid, define the first 2 configurations, and run the following command, where T123456 is a task id belonging to your project.

$ phable show T123456 --format=json | jq -r '.attachments.projects.projectPHIDs[]'

Note: you can also expose these configuration through the following environment variables, for backwards compatibility:

  • PHABRICATOR_URL
  • PHABRICATOR_TOKEN
  • PHABRICATOR_DEFAULT_PROJECT_PHID

Tips and tricks

Refer to your own phabricator username

You can address your own phabricator username as self. For example, you can assign a task to yourself by running

phable assign --username self T123456

This can be useful when sharing command aliases to another user without having them change the username to their own.

Defining your prefered text editor

Some phable commands, such as create or edit will open a text editor for you to edit the task description.

phable will attempt to respect your choice in term of what editor you would like to use, and perform a sensible guess if no editor is specified.

It will use

  1. the content of your EDITOR environment variable
  2. what was defined in configuration, under core.editor. For example
[core]
editor = nvim
  1. the output of the sensible-editor command (if it can be found)
  2. nano (if it is in your PATH)

If none of these options work, an error message will be raised and the command will fail.

Setting up aliases

You can define command aliases. For example, instead of typing phable move --column 'Done' --milestone T123456, you might want to type phable done T123456. To do this, open the phable configuration file, with $EDITOR $(phable config show) and define an alias:

[aliases]
done = move --column 'Done' --milestone

I personally currently have the following aliases:

$ phable config aliases list
done = move --column 'Done' --milestone
review = move --column 'Needs Review' --milestone
wip = move --column 'In Progress' --milestone
team-report = list --owner self --column 'In Progress' --column 'Needs Review' --column 'Blocked/Waiting' --column Done --milestone --format html

Phabricator task IDs as clickable links in iTerm2

If you're using iTerm2, you can turn the task IDs into clickable links, by going to iTerm2 > Settings > Profiles > Advanced > Smart Selection > Edit > [+]:

Then click on the new rule Notes field, and set it to Phabricator, and set the Regular expression field to T\d{6} (adjust the number of digits to what a task ID looks like in your instance. The latest created task has ID 385678 right now, so \d{6} gives us some leeway).

One that is done, holding Command when hovering on a task ID should turn it into a link.

Enabling autocompletion

bash

Add this to ~/.bashrc:

eval "$(_PHABLE_COMPLETE=bash_source phable)"

zsh

Add this to ~/.zshrc:

eval "$(_PHABLE_COMPLETE=zsh_source phable)"

fish

Add this to ~/.config/fish/completions/phable.fish:

_PHABLE_COMPLETE=fish_source phable | source

Contributing

Install all development dependencies using

make init

You can then run every linters and tests that would be run in CI by running:

make ci

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phable_cli-0.1.22.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phable_cli-0.1.22-py3-none-any.whl (45.9 kB view details)

Uploaded Python 3

File details

Details for the file phable_cli-0.1.22.tar.gz.

File metadata

  • Download URL: phable_cli-0.1.22.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.6 Darwin/25.5.0

File hashes

Hashes for phable_cli-0.1.22.tar.gz
Algorithm Hash digest
SHA256 ab182a5f202acff6734b5b20ac3e284dc3ff8cdbb1f3dbabe08a58228b9e63a8
MD5 3a11323ab360ef46073dd2806b673cb4
BLAKE2b-256 ad81b7a360879d8e272434023cf1a290344ffbd7bb5ab1d6e51048affac8ec7a

See more details on using hashes here.

File details

Details for the file phable_cli-0.1.22-py3-none-any.whl.

File metadata

  • Download URL: phable_cli-0.1.22-py3-none-any.whl
  • Upload date:
  • Size: 45.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.14.6 Darwin/25.5.0

File hashes

Hashes for phable_cli-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 09cd04010d79c5f80313d034abf145676b993dd575b474774d6798051fb8f71a
MD5 1fee3f34046b049f3ac66f815a1c93bf
BLAKE2b-256 1752f3e57676f05af66bdbf81b7b2392119b5a17d3de20ceb5a3015c43b95b1b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.22 This release

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page