AI rewrite mode

Updated Jul 27, 2026

Run non-interactive AI text rewriting with expand or reword mode:

frankie \
  --ai-rewrite-mode expand \
  --ai-rewrite-text "Thanks, this will be updated." \
  --ai-api-key sk_example

The command-line interface (CLI) output includes:

  • An explicit AI-originated label on generated text.
  • A side-by-side preview (original || candidate).
  • Graceful fallback output when the AI call fails, while preserving original text.

If --ai-rewrite-mode and --ai-rewrite-text are not provided together, Frankie returns a configuration error.

The same AI transport settings (--ai-base-url, --ai-model, --ai-api-key, and --ai-timeout-seconds) are also used by PR discussion summary generation.