Skip to main content

Beautiful TUI and web dashboard for GitHub PRs and CI status

Project description

prview

A beautiful TUI and web dashboard for GitHub PRs and CI status.

Python 3.9+ License: MIT

Features

  • Your Open PRs - View all your open PRs across multiple repos/orgs
  • Needs Your Review - PRs where your review has been requested
  • CI Status - At-a-glance CI status (pass/fail/running)
  • Review Status - Approval status (approved/changes requested/required)
  • Diff Stats - Lines added/removed per PR
  • TUI Mode - Beautiful terminal UI with keyboard navigation
  • Web UI - VS Code-inspired dark theme dashboard with real-time updates
  • Configurable - YAML config for orgs, repos, includes/excludes

Installation

From PyPI

pip install prview

# With keyboard navigation support (TUI)
pip install prview[keyboard]

# With web UI support
pip install prview[web]

# Everything
pip install prview[all]

From source

git clone https://github.com/aminghadersohi/prview.git
cd prview
pip install -e ".[all]"

Requirements

  • Python 3.9+
  • gh CLI installed and authenticated (gh auth login)

Usage

TUI Mode

prview                     # Run once and display
prview --watch             # Watch mode with auto-refresh & keyboard navigation
prview --init              # Create default config file
prview --help              # Show all options

Web UI Mode

prview serve               # Start web server at http://localhost:8420
prview serve --port 3000   # Custom port
prview serve --host 0.0.0.0  # Listen on all interfaces

CLI Options

# Override config via CLI
prview --repos owner/repo1 owner/repo2
prview --orgs my-org another-org
prview --interval 30       # Refresh every 30 seconds

Keyboard Shortcuts (TUI Watch Mode)

Key Action
↑/↓ Navigate PRs
Tab Switch between sections
Enter Open selected PR in browser
r Refresh data
q Quit

Configuration

Config file location: ~/.config/prview/config.yaml

# Organizations to include
include_orgs:
  - my-org
  - another-org

# Specific repos to include
include_repos:
  - owner/specific-repo

# Organizations to exclude
exclude_orgs:
  - archived-org

# Specific repos to exclude
exclude_repos:
  - owner/archived-repo

# Auto-refresh interval in seconds
refresh_interval: 60

# Show draft PRs
show_drafts: true

# Max PRs to show per repository
max_prs_per_repo: 10

Status Icons

CI Status

  • (green) - All checks passed
  • (red) - Checks failed
  • (yellow) - Checks running/pending
  • (dim) - No checks

Review Status

  • (green) - Approved
  • (red) - Changes requested
  • (yellow) - Review required
  • (dim) - Pending/No reviews

Architecture

  • TUI: Python + Rich for beautiful terminal rendering
  • Web UI: FastAPI + Jinja2 + HTMX for reactive server-rendered UI
  • Data: SQLite for caching, Server-Sent Events for real-time updates
  • GitHub: Uses gh CLI for authentication and API access

License

MIT License - see LICENSE for details.

Contributing

Contributions welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prview-0.2.2.tar.gz (874.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prview-0.2.2-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file prview-0.2.2.tar.gz.

File metadata

  • Download URL: prview-0.2.2.tar.gz
  • Upload date:
  • Size: 874.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for prview-0.2.2.tar.gz
Algorithm Hash digest
SHA256 5b23deec386e49135e29da36fc023281df8691defd8b8e1922497210c47433b6
MD5 13e2abc616d50134ecb311e314ac24f7
BLAKE2b-256 d969fb742c00d1ad5f930b636ed1e89670bb01ad2f8cc16deb270ac2d731d359

See more details on using hashes here.

File details

Details for the file prview-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: prview-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for prview-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 572ffed2b2335d20fa987cf34e0e26f48ef091d8da1a49f0b41a790880609c05
MD5 74df38b7ce01497089ca7017cf7b5c91
BLAKE2b-256 f3d0a7f886dcb9d6c5a7e9d99005350567a2bc585d1abfc4b682f33a3a4043a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page