Skip to main content

CLI for Phabricator and Phorge review feedback workflows

Project description

phab-feedback

phab-feedback is a small command-line client for reviewing and acting on Phabricator and Phorge feedback. It keeps inline replies as real inline-thread replies, exposes draft actions explicitly, and produces structured JSON suitable for both people and automation.

How this differs

arc and moz-phab handle author-side Differential workflows such as creating or updating revisions from local commits, with arc also providing landing workflows. phabfive provides broader Conduit-based access to Phabricator and Phorge applications such as Maniphest, Paste, Diffusion, Passphrase, and User.

phab-feedback complements those tools by focusing on structured Differential feedback, inline threads, explicit draft actions, and browser-only mutations that Conduit does not expose. Its optional Mozilla Review Helper rating and AI-review commands remain isolated from the generic Phabricator and Phorge behavior.

Install

Python 3.10 or newer is required.

After the first PyPI release is published, run the CLI without installing it:

uvx phab-feedback --help

For a persistent installation, uv is recommended:

uv tool install phab-feedback
phab-feedback --help

pipx is an alternative:

pipx install phab-feedback
phab-feedback --help

To try unreleased development from GitHub:

uv tool install git+https://github.com/loganrosen/phab-feedback.git

For local source development:

git clone https://github.com/loganrosen/phab-feedback.git
cd phab-feedback
python3 -m pip install -e .
python3 -m unittest discover -s tests

Configuration

Choose a host with --host, PHAB_FEEDBACK_HOST, or ~/.config/phab-feedback/config.json, in that order:

{
  "host": "https://phabricator.example.com",
  "cookie_name": "phsid"
}

If no host is configured and ~/.arcrc contains exactly one host, phab-feedback uses it. Conduit tokens come from PHAB_FEEDBACK_TOKEN or the matching ~/.arcrc entry. Tokens are never accepted as command-line arguments.

Internal web actions need a logged-in browser session. Set PHAB_FEEDBACK_SESSION_COOKIE to a complete Cookie header value, or to the value of the configured session cookie. The value is never printed. Mozilla Phabricator users can instead pass --firefox-cookies to discover the session from a local Firefox profile; --firefox-profile selects a specific profile.

XDG_CONFIG_HOME and PHAB_FEEDBACK_ARCRC are respected. The config file is for non-secret settings; keep tokens in .arcrc or the environment and session cookies in the environment or browser store.

Commands

All successful commands write JSON to stdout. Message-taking commands accept exactly one of --message, --message-file PATH, or --message-file -. When stdin is redirected, it is also accepted without an option.

# Read the complete chronological feedback timeline.
phab-feedback timeline D123

# Post an immediate top-level revision comment through Conduit.
phab-feedback comment D123 --message-file reply.txt

# Create a true inline-thread reply draft, then publish it separately.
printf '%s\n' 'Handled in the latest update.' |
  phab-feedback reply-inline D123 456
phab-feedback submit D123

# Explicitly create and publish an inline reply in one invocation.
phab-feedback reply-inline D123 456 --message 'Done.' --submit

# Remove an accidental top-level comment after validating its type.
phab-feedback remove-comment D123 789

# Create Done drafts, then submit them.
phab-feedback mark-done D123 456 457
phab-feedback submit D123

timeline, comment, and the metadata validation used by mutations rely on standard Conduit APIs. Inline reply drafting, top-level comment removal, Done drafting, and draft submission use internal web endpoints available in upstream Phabricator and Phorge. Those endpoints are less stable than Conduit and may change between server releases.

These commands are Mozilla-only because they use the Review Helper extension, not upstream Phabricator:

phab-feedback mark-helpful D123 456
phab-feedback mark-unhelpful D123 457
phab-feedback request-ai-review D123

Helpful and unhelpful ratings take effect immediately. Inline replies and Done states remain drafts until submit; reply-inline --submit is the only intentional combined workflow. Rating, Done, and reply actions are never combined implicitly.

The repository also includes an optional thin agent skill. It contains workflow and approval guidance only; the CLI remains the single implementation of all deterministic behavior. Install it through the open Skills CLI:

npx skills add loganrosen/phab-feedback@phab-feedback -g

The Skills CLI handles the supported agent-specific installation paths. The Python package does not modify agent configuration or install the skill automatically.

Security

Credentials are sent only in request headers or bodies to the configured host. Errors omit request bodies, tokens, and cookies. Avoid enabling shell tracing while setting credential environment variables.

License

MIT

Project details


Download files

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

Source Distribution

phab_feedback-0.1.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

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

phab_feedback-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file phab_feedback-0.1.0.tar.gz.

File metadata

  • Download URL: phab_feedback-0.1.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for phab_feedback-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e5e8cf967d2bd3c319568fc815804495d106ec7e6c71d1d9f79d99f7237de126
MD5 f7a3d0224ebf5cedfc6ebdec6834b73f
BLAKE2b-256 e62e2e30181abcd1b3b8446709a008cd5f1955279a300c22ce88283fb68fad56

See more details on using hashes here.

Provenance

The following attestation bundles were made for phab_feedback-0.1.0.tar.gz:

Publisher: release.yml on loganrosen/phab-feedback

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phab_feedback-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: phab_feedback-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for phab_feedback-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 415def3b85b0867cf59d7c296effc8edf04e66295c90e24e619e63d6b84e8194
MD5 21362f1778b37a6426b875743ba2931c
BLAKE2b-256 895a41f5f81c62151b1f014598a3a4ffac0081b87cb17a7bb6957e6506a4f156

See more details on using hashes here.

Provenance

The following attestation bundles were made for phab_feedback-0.1.0-py3-none-any.whl:

Publisher: release.yml on loganrosen/phab-feedback

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page