Skip to content

kmckelvin/ghui

 
 

Repository files navigation

ghui

Terminal UI for keeping up with your open GitHub pull requests and GitLab merge requests across repositories.

ghui gives you one keyboard-driven place to review PR/MR details, inspect diffs, leave diff comments, manage labels, toggle draft state, merge, open requests in the browser, and copy metadata without leaving the terminal.

image

Install

npm install -g @kitlangton/ghui

Requirements:

  • Bun runtime installed
  • GitHub CLI installed and authenticated with gh auth login for GitHub repositories
  • GitLab CLI installed and authenticated with glab auth login for GitLab repositories

Run it from anywhere:

ghui

Local Development

Clone, install, and link:

git clone https://github.com/kitlangton/ghui.git
cd ghui
bun install
bun link

With Nix flakes:

nix develop
bun install
bun run dev

Configuration

  • GHUI_PROVIDER: optional github or gitlab override; when unset, ghui detects from GHUI_REPO URLs or the current git remote
  • GHUI_AUTHOR: author username, defaults to @me
  • GHUI_REPO: optional repository queue for browsing all open requests in a repo; supports GitHub owner/name and GitLab nested paths like group/subgroup/project
  • GHUI_GITLAB_HOST: optional GitLab hostname for self-managed GitLab API calls
  • GHUI_PR_FETCH_LIMIT: max requests fetched, defaults to 200

Example:

GHUI_AUTHOR=@me ghui
GHUI_REPO=basecamp/omarchy ghui
GHUI_PROVIDER=gitlab GHUI_REPO=gitlab-org/gitlab ghui
GHUI_REPO=https://gitlab.com/gitlab-org/gitlab ghui

You can also copy .env.example to .env and edit the values locally.

Keybindings

  • up / down: move selection
  • k / j: move selection
  • gg / G: jump to first or last pull request
  • ctrl-u / ctrl-d: page up or down
  • tab / shift-tab: switch PR queue
  • ctrl-p / cmd-k: open the command palette
  • /: filter
  • enter: expand details; normal PR actions still work while details are expanded
  • esc: return from expanded details, leave diff/comment mode, or close modal
  • r: refresh
  • d: view stacked diff for all changed files
  • c: enter or exit diff comment mode while viewing a diff
  • up / down / pageup / pagedown: move comment target while in diff comment mode
  • enter: open a commented diff line, or start a comment on an uncommented line
  • a: add a comment while in diff comment mode
  • left / right: choose the deleted or added side while in split diff comment mode
  • [ / ]: switch files while viewing or commenting on a diff
  • s: toggle draft or ready-for-review state
  • m: merge
  • x: close with confirmation
  • t: choose theme, including System to match your terminal colors
  • l: manage labels
  • o: open PR in browser
  • y: copy PR metadata
  • q: quit

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 99.8%
  • Nix 0.2%