A fast, keyboard-driven terminal UI for browsing and managing GitHub Pull Requests.
Built with Bubble Tea and the GitHub CLI.
- 🔍 Powerful Search - Search PRs with GitHub's query syntax
- 📑 Multiple Tabs - Browse multiple PRs and searches simultaneously
- ⌨️ Vim-style Keys - Navigate efficiently with familiar keybindings
- 📝 Full PR Management - Comment, approve, request changes, merge
- 👥 Team Collaboration - Add reviewers and assignees
- 💾 Saved Searches - Save frequently used searches to config
- 🎨 Rich Rendering - Markdown support, syntax highlighting, colored diffs
- 🔄 Live Updates - Refresh PRs and searches on demand
- GitHub CLI (
gh) - Must be installed and authenticated - Go 1.21+ (for installation)
go install github.com/dbd/ght@latestThis installs the ght binary to $GOPATH/bin (usually ~/go/bin).
Standard Go installation:
Make sure $GOPATH/bin is in your PATH:
export PATH="$HOME/go/bin:$PATH"If using asdf: Add asdf's Go packages bin to your PATH:
export PATH="$HOME/.asdf/installs/golang/$(asdf current golang | awk '{print $2}')/packages/bin:$PATH"git clone https://github.com/dbd/ght.git
cd ght
go build
./ght-
Authenticate with GitHub CLI (if not already done):
gh auth login
-
Configure your searches in
~/.config/ght/config.yaml:pr: searches: - name: "My PRs" query: "is:pr author:@me" - name: "Review Queue" query: "is:pr review-requested:@me" - name: "Team PRs" query: "is:pr org:yourorg is:open"
-
Launch ght:
./ght
| Key | Action |
|---|---|
j/k or ↑/↓ |
Move up/down |
h/l or ←/→ |
Switch tabs left/right |
Enter |
Open selected PR |
q or Ctrl+W |
Close current tab |
Esc or Ctrl+C |
Exit application / Cancel dialog |
? |
Toggle help |
Ctrl+Z |
Suspend to shell |
| Key | Action |
|---|---|
/ |
Enter search/filter mode |
Enter |
Execute search (in search mode) |
Esc |
Cancel search |
| Key | Action |
|---|---|
c |
Show/hide comments |
C |
Add comment |
a |
Approve PR |
x |
Request changes |
r |
Add reviewer |
A |
Add assignee (Shift+A) |
m |
Open merge dialog |
Press : to enter command mode. Available commands:
| Command | Description |
|---|---|
:newtab |
Create a new search tab |
:save-tab <name> |
Save current search to config |
:refresh |
Refresh current tab |
:merge |
Open merge dialog |
:add-assignee <username> |
Add assignee to PR |
:add-reviewer <username> |
Add reviewer to PR |
:comment <message> |
Add a comment to PR |
:approve [message] |
Approve PR with optional comment |
:request-changes <message> |
Request changes on PR |
:help |
Show help dialog |
Configuration file location: ~/.config/ght/config.yaml
pr:
searches:
- name: "My Open PRs"
query: "is:pr author:@me is:open"
- name: "Needs My Review"
query: "is:pr review-requested:@me is:open"
- name: "Recently Updated"
query: "is:pr is:open sort:updated-desc"
- name: "Assigned to Me"
query: "is:pr assignee:@me is:open"Use GitHub's advanced search syntax for powerful queries:
is:pr- Pull requests onlyis:open/is:closed/is:merged- PR stateauthor:username- PRs by authorauthor:@me- Your PRsreview-requested:@me- PRs requesting your reviewassignee:username- PRs assigned to userorg:orgname- PRs in organizationrepo:owner/repo- PRs in specific repolabel:bug- PRs with labelsort:updated-desc- Sort by update time
Full search syntax documentation
- Start
ghtand select "Review Queue" tab - Browse PRs with
j/k - Press
Enterto view PR details - Read diff and comments
- Press
ato approve, orxto request changes - Enter your review message and press
Ctrl+S - Press
qto close tab and return to queue
From any PR detail view:
:comment Great work! LGTM 🚀
Or use the dialog:
- Press
C - Type your comment
- Press
Ctrl+Sto submit
- Open PR detail
- Press
mor type:merge - Select merge method (merge commit, squash, rebase)
- Confirm with
Ctrl+S
Quick command:
:add-reviewer username
Or use dialog:
- Press
r - Enter username
- Press
Enter
├── main.go # Entry point
├── update.go # Root update handler
├── view.go # Root view + header/footer
├── commands.go # Command mode handlers
├── components/
│ ├── types.go # Page interface, command types
│ ├── keys.go # Key bindings
│ ├── styles.go # Lipgloss styles
│ ├── config.go # Configuration management
│ ├── mergeDialog.go # Merge dialog component
│ ├── reviewDialog.go # Review dialog component
│ ├── inputDialog.go # Input dialog component
│ ├── helpDialog.go # Help dialog component
│ ├── pullRequestSearch/ # PR list/search component
│ ├── pullRequestDetail/ # PR detail view + diff
│ └── tab/ # Tab wrapper component
├── internal/api/
│ ├── pullrequest.go # GitHub API calls
│ └── types.go # API response types
└── utils/
└── gitDiffParse.go # Git diff parser
# Run main application
go run .
# Run dev utilities
go run ./cmd/pr # PR diff rendering test
go run ./cmd/query # API query testSee AGENTS.md for detailed development documentation.
Use :newtab to create a new search tab, enter your query with /, then save it with :save-tab "My Custom Search".
In your PR list, press / and type the PR number to quickly filter.
Use with tmux or screen:
Ctrl+Zsuspends ght to shellfgreturns to ght- Or run in dedicated tmux pane
Comments support full markdown syntax:
:comment ## Summary
This PR looks great!
- [x] Code reviewed
- [x] Tests passing
- [ ] Documentation updated
Install and authenticate GitHub CLI:
# Install (macOS)
brew install gh
# Install (Linux)
# See https://github.com/cli/cli/blob/trunk/docs/install_linux.md
# Authenticate
gh auth loginEnsure config file exists:
mkdir -p ~/.config/ght
touch ~/.config/ght/config.yamlGitHub CLI uses your authenticated token. Check rate limits:
gh api rate_limitContributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
- Built with Bubble Tea TUI framework
- Uses Lipgloss for styling
- Uses Glamour for markdown rendering
- Powered by GitHub CLI