live-pr

command module
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 3 Imported by: 0

README

╻  ╻╻ ╻┏━╸   ┏━┓┏━┓
┃  ┃┃┏┛┣╸ ╺━╸┣━┛┣┳┛
┗━╸╹┗┛ ┗━╸   ╹  ╹┗╸

live-pr

CI Release License Go Report Card

Living pull request for LLM-assisted development.

demo

A GitHub PR records only the compressed final conclusion. The actual iteration — pivots, discarded approaches, why each decision was made — happens locally with the coding agent and is thrown away.

live-pr keeps that timeline alive: agents and humans append decision / pivot / note records during development, you review the branch like a GitHub PR in a local TUI, and at the end the timeline ships as the body of a real pull request.

Features

  • Decision timeline — append-only records from humans and agents, editable from the TUI and CLI
  • GitHub-PR-style TUI — PR list with views/filters/stacks, and a detail screen with the conversation beside a review pane
  • Full conversation sync — PR description, comments, submitted reviews (colored verdicts), inline review comments, and lifecycle activity
  • Comment from the TUI — post, edit, and delete GitHub conversation comments; edit the PR description
  • Review from the TUI — inline comments plus a verdict (comment / approve / request changes) submitted together
  • Pluggable review pane — embedded Neovim CodeDiff, delta, or built-in git diff; switch with --diff
  • Local-first context — checked-out PR file diffs stay on the pushed head; unpushed commits and working-tree changes remain available in the commit picker
  • PR LIST / LOCAL / LIVE / REMOTE status line — distinguishes the navigator, PR-less local work, the checkout's PR, and other fetched PRs; dirty/ahead/behind stay separate
  • Live PR monitoring — LIVE checkouts poll lightweight head, state, draft, and CI metadata without replacing the local review
  • PR export — live-pr pr publish creates or updates the GitHub PR with the timeline as its body
  • Mouse support — wheel scrolling per pane, click to select or open a PR, view tabs, and popup options

Status

Alpha, and versioned 0.x. Releases go out several times a day; keybindings, configuration keys, and on-disk state can change between 0.x releases without a deprecation period. v1.0 is the point where those three stop moving without a migration path — a goal, not a date.

Install

With Homebrew (macOS):

brew install shonenm/live-pr/live-pr

Or download a platform archive from GitHub Releases:

version=$(curl -fsSI https://github.com/shonenm/live-pr/releases/latest | tr -d '\r' | sed -n 's#.*/tag/##p')
case $(uname -m) in x86_64) arch=amd64 ;; *) arch=$(uname -m) ;; esac
asset="live-pr_${version#v}_$(uname -s)_${arch}.tar.gz"
tmp=$(mktemp -d)
curl -fL "https://github.com/shonenm/live-pr/releases/download/$version/$asset" -o "$tmp/$asset"
tar -xzf "$tmp/$asset" -C "$tmp"
mkdir -p "$HOME/.local/bin"
install -m755 "$tmp/live-pr" "$HOME/.local/bin/live-pr"

Or with Go:

go install github.com/shonenm/live-pr@latest

Requirements: Git. An authenticated GitHub CLI (gh) for GitHub browsing, commenting, reviewing, and publishing. Neovim CodeDiff and delta are optional; raw git diff is built in.

Platforms: macOS and Linux are the supported targets — macOS is what live-pr is developed on, and the full test suite (plus go vet and the race detector) runs on Linux in CI. The macOS and Windows CI jobs only compile everything and run the terminal-embedding tests. Releases include a Windows archive, but Windows is build-verified only: nobody exercises the TUI there, so treat it as untested.

Quick start

live-pr demo             # disposable demo, no GitHub resources touched
live-pr                  # open the TUI for the current repository and branch
live-pr --diff=delta     # pick the review pane: git, delta, codediff, codereview, or a command
live-pr pr publish       # push and create/update the GitHub PR from the timeline

Press ? in the TUI for keybindings, or see docs/keybindings.md.

Configuration

~/.config/live-pr/config.toml, overridden per-repo by .live-pr.toml:

theme = "primer-dark"        # primer-dark (default) | primer-light | nord | catppuccin-mocha
summarize_command = ""       # summary backend: transcript on stdin, summary on stdout ("" = claude -p)

[diff]
command = 'nvim -c "CodeDiff --inline $LIVE_PR_RANGE"'  # embedded reviewer ("" = built-in git diff)
display = "delta --color-only"                          # static diff filter
split_ratio = 20                                        # conversation : review width (detail screen)
min_pane_width = 60

[list]
split_ratio = 50             # list : preview width on the PR list screen (default 45)

[merge]
methods = ["squash", "merge", "rebase"] # display order; first is selected by default

[ci]
command = ""                 # append command stdout to the hierarchical CI checks view
# provider = "woodpecker"     # use woodpecker-cli and its existing context/keyring
# Available to command: LIVE_PR_REPO, LIVE_PR_PR_NUMBER, LIVE_PR_PR_URL, LIVE_PR_HEAD_SHA

[accessibility]
monochrome = false           # remove ANSI color/style output
ascii = false                # replace UI arrows, status glyphs, spinners, and borders with ASCII

merge.methods must contain merge, squash, and rebase exactly once.

See docs/diff-tool-integration.md for reviewer details and docs/local-review-modes.md for LOCAL/LIVE/REMOTE behavior and data ownership.

diff.command, diff.commit_command, ci.command, and summarize_command are run through a shell, and .live-pr.toml is read from the repository you are viewing — so a repository you clone can run a command of its author's choosing when you start live-pr in it, the same exposure as Vim's exrc. Review the per-repo configuration of repositories you do not trust; SECURITY.md covers the trust boundaries in full.

The Woodpecker provider normally reuses the active woodpecker-cli context. Headless hosts can configure authentication only in the global config (repository configuration cannot override these fields):

[ci]
server = "https://ci.example.com"
# Optional when the CLI is managed by mise and is not directly on PATH:
cli_command = ["mise", "exec", "--", "woodpecker-cli"]
token_command = ["op", "read", "op://Personal/Woodpecker/credential"]

The token command is executed directly without a shell. Its single-line stdout is passed only to the child CLI as WOODPECKER_TOKEN and is not persisted.

Agent Skill

Teach coding agents when to record decisions:

gh skill install shonenm/live-pr live-pr --agent claude-code --scope user

The binary carries the matching skill version (live-pr skill path). A Claude Code Stop hook (live-pr init --hooks) can summarize sessions into the timeline automatically.

More

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd wires the live-pr command-line interface.
Package cmd wires the live-pr command-line interface.
internal
atomicfile
Package atomicfile provides the final replacement step for temp-file saves.
Package atomicfile provides the final replacement step for temp-file saves.
clipboard
Package clipboard writes text to the user's clipboard, preferring native tools and falling back to the OSC 52 terminal escape.
Package clipboard writes text to the user's clipboard, preferring native tools and falling back to the OSC 52 terminal escape.
config
Package config loads live-pr settings: a global file plus an optional per-repo override.
Package config loads live-pr settings: a global file plus an optional per-repo override.
debugtime
Package debugtime provides opt-in wall-clock timings without a metrics subsystem.
Package debugtime provides opt-in wall-clock timings without a metrics subsystem.
demo
Package demo builds the disposable git repository, mock GitHub origin, and fake gh binary behind the live-pr demo command.
Package demo builds the disposable git repository, mock GitHub origin, and fake gh binary behind the live-pr demo command.
diffview
Package diffview runs an optional non-interactive right-pane diff filter.
Package diffview runs an optional non-interactive right-pane diff filter.
embeddedterm
The TUI runs on Bubble Tea v2 while portalis still speaks v1.
The TUI runs on Bubble Tea v2 while portalis still speaks v1.
event
Package event defines the timeline event model and its append-only JSONL store.
Package event defines the timeline event model and its append-only JSONL store.
git
Package git wraps the handful of git commands live-pr needs by shelling out, rather than pulling in a full git library.
Package git wraps the handful of git commands live-pr needs by shelling out, rather than pulling in a full git library.
github
Package github wraps the GitHub CLI operations live-pr needs.
Package github wraps the GitHub CLI operations live-pr needs.
hook
Package hook implements the agent-hook entrypoints that feed the timeline.
Package hook implements the agent-hook entrypoints that feed the timeline.
markdown
Package markdown renders GitHub-flavored comment text for the terminal.
Package markdown renders GitHub-flavored comment text for the terminal.
prbody
Package prbody renders a pull-request body from the conclusion and timeline.
Package prbody renders a pull-request body from the conclusion and timeline.
prfilter
Package prfilter holds the Model-independent PR-list domain logic: the GitHub-search-like filter query DSL, the CI health it filters on, and base/head stack grouping.
Package prfilter holds the Model-independent PR-list domain logic: the GitHub-search-like filter query DSL, the CI health it filters on, and base/head stack grouping.
prtemplate
Package prtemplate loads GitHub-compatible default pull-request templates.
Package prtemplate loads GitHub-compatible default pull-request templates.
publish
Package publish creates or updates the current branch's GitHub pull request.
Package publish creates or updates the current branch's GitHub pull request.
richcontent
Package richcontent prepares optional terminal-friendly GitHub content.
Package richcontent prepares optional terminal-friendly GitHub content.
store
Package store locates live-pr's user-level runtime data for one repo + branch.
Package store locates live-pr's user-level runtime data for one repo + branch.
summarize
Package summarize turns a session transcript into a timeline summary entry.
Package summarize turns a session transcript into a timeline summary entry.
terminaltext
Package terminaltext makes untrusted text safe to print in a terminal.
Package terminaltext makes untrusted text safe to print in a terminal.
theme
Package theme contains the GitHub Primer dark colors shared by terminal views.
Package theme contains the GitHub Primer dark colors shared by terminal views.
timeline
Package timeline holds higher-level operations over the event log.
Package timeline holds higher-level operations over the event log.
transcript
Package transcript extracts a compact natural-language transcript from a Claude Code session log (JSONL), dropping tool traffic.
Package transcript extracts a compact natural-language transcript from a Claude Code session log (JSONL), dropping tool traffic.
tui
Asynchronous tea.Cmd constructors that run work off the Update goroutine.
Asynchronous tea.Cmd constructors that run work off the Update goroutine.
Package skills embeds the Agent Skill shipped with the live-pr binary.
Package skills embeds the Agent Skill shipped with the live-pr binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL