| Crates.io | phab-comments-to-md |
| lib.rs | phab-comments-to-md |
| version | 0.2.0 |
| created_at | 2025-07-29 07:32:24.106645+00 |
| updated_at | 2025-09-09 11:30:19.952724+00 |
| description | Extract Phabricator review comments and format them as Markdown for analysis by LLM agents |
| homepage | |
| repository | https://github.com/padenot/phab-comments-to-md |
| max_upload_size | |
| id | 1772036 |
| size | 164,863 |
Extract Phabricator review comments and format them as Markdown for further analysis by LLM agents. The tool automatically extracts both regular comments and JavaScript-rendered inline code suggestions by using your Firefox browser cookies for authentication.
cargo build --release
# Using full URL
./target/release/phab-comments-to-md --url https://phabricator.services.mozilla.com/D12345 --token your-api-token
# Using diff ID (defaults to Mozilla's Phabricator)
./target/release/phab-comments-to-md --diff-id 12345 --token your-api-token
./target/release/phab-comments-to-md --diff-id D12345 --token your-api-token # 'D' prefix optional
# Using diff ID and custom base URL
./target/release/phab-comments-to-md --diff-id 12345 --base-url https://phabricator.example.com --token your-api-token
# Save to file
./target/release/phab-comments-to-md --diff-id 12345 --token your-api-token --output review.md
# Include "done" comments (useful for LLM verification)
./target/release/phab-comments-to-md --diff-id 12345 --token your-api-token --include-done
The tool requires both API token and browser cookies for full functionality:
The tool automatically finds and uses cookies from your most recent Firefox profile that has logged into Phabricator. It:
If automatic Firefox cookie detection doesn't work, set cookies manually:
export PHABRICATOR_COOKIES="phsid=your-session-id; phusr=your-username"
Set environment variables to simplify usage:
# Set both token and base URL (for non-Mozilla Phabricator instances)
export PHABRICATOR_TOKEN=your-api-token
export PHABRICATOR_BASE_URL=https://phabricator.example.com
# For Mozilla's Phabricator, only token is needed (base URL defaults to Mozilla's)
export PHABRICATOR_TOKEN=your-api-token
# Optional: Manual cookie override (if Firefox auto-detection fails)
export PHABRICATOR_COOKIES="phsid=your-session-id; phusr=your-username"
# Now you can use just the diff ID
./target/release/phab-comments-to-md --diff-id 12345
--token or set it as PHABRICATOR_TOKEN environment variableOptions:
--url <URL> Full Phabricator review URL
--diff-id <DIFF_ID> Differential revision ID (with or without 'D' prefix)
--base-url <BASE_URL> Base Phabricator URL (defaults to Mozilla's Phabricator)
--token <TOKEN> Phabricator API token (or set PHABRICATOR_TOKEN env var)
--output <OUTPUT> Output file path (defaults to stdout)
--include-done Include comments marked as "done" (useful for LLM verification)
-h, --help Print help
-V, --version Print version
Environment Variables:
PHABRICATOR_TOKEN - API token (avoids passing token on command line)PHABRICATOR_BASE_URL - Base URL (for non-Mozilla Phabricator instances)PHABRICATOR_COOKIES - Manual cookie override (format: "phsid=id; phusr=user")You must provide either --url OR --diff-id. When using --diff-id, the base URL defaults to Mozilla's Phabricator.
--include-done to show resolved comments with [DONE] markersThe tool generates Markdown with:
Comments marked as "done" are automatically filtered out to focus on active
discussion. Use --include-done to include them with clear [DONE] markers for
LLM verification of addressed feedback.
Licensed under either of
at your option.