Skip to content

Repository files navigation

Saga

PyPI Python versions CI License: MIT

AI writes most of our code now, and the pull requests it opens keep getting larger, denser, and more frequent. Writing is no longer the bottleneck, reviewing is. And a two-thousand-line diff across forty files doesn't fit in anyone's head; scrolling it top-to-bottom is how real bugs get waved through.

Saga turns that diff into a chapter-by-chapter guided tour. The whole change partitioned into an ordered story, each chapter narrated in plain language with just the hunks that belong to it. You review with judgment instead of drowning. Point it at a branch or a PR and you have one in seconds.

The output is one HTML file with everything inlined (diff2html, syntax highlighting, the data). Open it offline, email it, commit it, or drop it on any static host.

Walking through an example saga chapter by chapter
▶ Explore the interactive example →

New here? I wrote about why reviewing (not writing) is the job now, and how saga tackles it: the story behind saga →

Quickstart

To run saga with no install, diff your current branch with origin/main

cd your-repo
uvx --from saga-cli saga

Or generate a saga from a GitHub PR:

uvx --from saga-cli saga https://github.com/owner/repo/pull/5

Installation

Using saga regularly? Install it once so the command is just saga: uv tool install saga-cli (or pipx install saga-cli).

Documentation

Full docs live at https://jakeberesford.github.io/saga/:

  • Installation: requirements and how to install.
  • Usage: running on a branch or a PR, and every flag.
  • Providers: Anthropic, OpenAI, OpenRouter, local LLMs, and the Claude Code CLI.
  • Reviewing: leaving comments on a saga and publishing them to GitHub, or pulling them into your agent.
  • CI: rendering a saga per pull request in GitHub Actions.
  • How it works: the pipeline, end to end.

Contributing? See CONTRIBUTING.md

Releases

Packages

Contributors

Languages