Comment export mode

Updated Jul 27, 2026

Export review comments in structured formats for downstream processing by artificial intelligence (AI) tools or human review:

frankie --pr-url https://github.com/owner/repo/pull/123 --export markdown

Export formats

Frankie supports three export formats:

  • Markdown (--export markdown) — Human-readable format with code blocks and syntax highlighting hints
  • JSONL (--export jsonl) — Machine-readable format with one JSON object per line
  • Template (--export template --template <file>) — Custom Jinja2-compatible template format; requires --template with the path to a Jinja2 template file

Output destination

By default, exported content is written to stdout. Use --output to write to a file instead:

# Export to stdout
frankie --pr-url https://github.com/owner/repo/pull/123 --export markdown

# Export to file
frankie --pr-url https://github.com/owner/repo/pull/123 --export jsonl --output comments.jsonl

Stable ordering

Comments are sorted in a stable, deterministic order:

  1. By file path (alphabetically, missing paths sorted last)
  2. By line number (ascending, missing line numbers sorted last)
  3. By comment ID (ascending, for tie-breaking)

This ensures consistent output across runs for the same PR state.

Markdown format example

The output includes a header, then each comment with location, reviewer, body, and code context (if available):

```markdown

Review Comments Export

PR: https://github.com/owner/repo/pull/123