Skip to content
BorjaIPPublic

About

Interactive terminal UI for reviewing GitHub pull requests with AI-powered analysis

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PRism

PRism

A terminal review queue for GitHub pull requests: sort the pile, read the diff, leave the verdict — without leaving the shell.

License: MIT Python 3.12+ Terminal: Textual Forge: GitHub

Version 0.2.0 · what changed

The review workspace: file tree, diff, comments and the AI pass

Why

Review requests arrive faster than anyone can read them. Hundreds of open PRs across a dozen repositories is an ordinary queue now, and the browser tab costs you the diff, the tests and the editor you were already in.

PRism makes the queue the thing you operate on. One screen lists what is waiting, one key opens a PR, four panels show the files, the diff, the conversation and an AI read of the file you are looking at. Approve or send it back from the same keyboard, and PRism records it in a local list so tomorrow's pile starts where today's ended.

  • The queue first, the file second. You triage a list, not a page.
  • Reads freely, writes only what you confirm. Every POST is behind a key and a modal.
  • Terminal-native. One process, no server, no account, no database.

What you get

Screen What it is for
Review Requested Every open PR where you are the requested reviewer, from the GitHub search API
Recently Reviewed The last 50 PRs you opened, kept locally so you can come back without GitHub
Review workspace File tree with per-file risk, diff, review thread, and the AI pass side by side

The PR browser: recently reviewed list and preview

Install

export GITHUB_TOKEN=$(gh auth token)   # or a PAT with the `repo` scope
uv tool install --from git+https://github.com/BorjaIP/prism prism
prism

pipx install git+https://github.com/BorjaIP/prism works the same way. From a clone:

git clone https://github.com/BorjaIP/prism && cd prism
uv sync && uv run prism

Requirements: Python 3.12+ and a GITHUB_TOKEN in the environment. Two things are optional and detected at runtime: delta for syntax-highlighted diffs, and the claude CLI for the AI pass.

Use

prism                                  # the browser
prism BorjaIP/medha 10                 # straight to owner/repo + number
prism https://github.com/BorjaIP/medha/pull/10

Browser

Key Action
j / k move through the list
enter open the PR
tab Recently Reviewed ↔ Review Requested
r refresh the current tab (bypasses the cache)
d drop the PR from your local list (never touches GitHub)
n open a PR by URL or owner/repo
o open in the browser · q quit

Review workspace

Key Action
p show or hide the comments panel
c comment on a line (the composer pre-fills the first changed line)
a / r approve / request changes
i show or hide the AI panel · S re-analyse · ctrl+s post its suggestion
ctrl+m expand the diff or the comments panel
ctrl+o jump mode: one key to focus any panel
e open the file in $EDITOR
y / o copy the PR URL / open it in the browser
ctrl+r refetch from GitHub · q back to the list

ctrl+p opens the command palette, which lists every action and every theme.

The AI pass

Select a file and PRism asks Claude for a one-paragraph summary, a risk level and the concerns worth checking, then flags that risk next to the file in the tree. Results are cached per file revision, so moving around a PR costs one call per file, not one per keystroke.

Two backends, chosen in ~/.config/prism/config.toml:

ai_backend What it uses Needs
claude_code (default) the claude CLI, so it reuses your Claude Code login claude in PATH
api the Anthropic SDK directly ANTHROPIC_API_KEY

The inline comment composer

Configuration

~/.config/prism/config.toml, written by PRism when you change the theme:

Key Default Meaning
theme prism-dark prism-dark, prism-light, nord, gruvbox, catppuccin-mocha, dracula, tokyo-night, or base16
show_ai_panel true start the review screen with the AI panel open
ai_backend claude_code claude_code or api
ai_model claude-haiku-4-5-20251001 any model your account can reach
editor $EDITOR used by e in the review screen
[keymap] {} override a binding, e.g. refresh = "ctrl+f5"

The GitHub token is read from GITHUB_TOKEN only — PRism never writes a secret to disk. Everything else it caches lives under ~/.cache/prism (one hour TTL, bypassed by r and ctrl+r) and ~/.config/prism/history.json.

Documentation

components every component, its layer and how data flows through the screen
roadmap what is next, and the case for each direction
development running it, the Textual devtools console, linting
testing unit and smoke tests, the Textual pilot
changelog what changed in each version

Where it is going

Review is no longer a single-PR job, so PRism is moving from a place to read one diff to a queue you can hand to an agent and audit afterwards: ranked triage, a headless --json mode so Claude Code, Codex or Hermes can triage before you wake up, and a forge interface so GitLab and GitHub Enterprise are not a rewrite. The reasoning, the options and the trade-offs are in docs/roadmap.md.

Limits

  • GitHub only. The service layer talks to PyGithub directly; GitLab is a port, not a flag.
  • GitHub search caps the list. The Review Requested tab uses the search API, which returns at most 1 000 results per query.
  • No line cursor in the diff yet. The composer asks for the line and pre-fills the first changed one; there is no vim-style line selection.
  • One AI backend family. Claude Code or the Anthropic API — no local models yet.
  • The AI read is a per-file opinion, not a review. It does not read the whole PR at once, and it can be wrong in the same ways any model can.

License

MIT.

About

Interactive terminal UI for reviewing GitHub pull requests with AI-powered analysis

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages