A fork of ghui by Kit Langton. The application, its design, and the great majority of the code are his work — this fork stands entirely on it. If you want the original, that's
@kitlangton/ghui, and it's the one to star. See credits for what this fork adds and why it exists separately.
Terminal UI for keeping up with GitHub pull requests, issues, diffs, and Actions across repositories.
phui gives you one keyboard-driven place to triage your GitHub notifications, browse your starred repositories, review PR details, inspect diffs, monitor and control Actions, leave diff comments, manage labels, toggle draft state, merge, open PRs in GitHub, and copy PR metadata without leaving the terminal.

Homebrew is the recommended install path on macOS and Linux. It installs a standalone phui binary, so you do not need Bun or npm at runtime.
brew install phall1/tap/phuiUpgrade with:
brew upgrade phuiOr install from npm — the package ships a prebuilt binary per platform, so Bun is not needed at runtime:
npm install -g @phall/phuiAny npm-compatible client works, since they all install from the same registry:
pnpm add -g @phall/phui
bun add -g @phall/phui
yarn global add @phall/phuiTo try it without installing anything:
npx @phall/phui
bunx @phall/phuiThe package is scoped because the unscoped phui name on npm belongs to an
unrelated project.
This fork publishes standalone binaries and the phall1/tap formula from
phall1/phui. The upstream npm release remains available separately:
npm install -g @kitlangton/ghuiRequirements:
- GitHub CLI installed and authenticated with
gh auth login
Run it from anywhere:
phuiOrdinary phui startup still needs only the authenticated gh CLI. You can
also open an exact repository or pull request at startup:
phui owner/repo
phui owner/repo#123 --view diff
phui https://github.com/owner/repo/pull/123 --view commentsFor pull requests, --view accepts details, diff, comments, or runs
and defaults to details. GitHub repository URLs are also accepted.
phux is optional. With phux 0.3.0 or
newer, an agent can open phui beside its pane without installing a plugin:
phux spawn --target @7 --split vertical -c /path/to/repo -- \
phui owner/repo#123 --view diff
phux ask @7 --id owner-repo-123-review \
"owner/repo#123 is ready for review"phux ask is the advisory human checkpoint. Agents should read and update
semantic review state through gh or the GitHub API, not by scraping or
keyboard-driving the phui screen.
This repository also ships a small, optional launch template for people who
prefer phux launch. Linking and enabling it is a manual setup step from a
phui checkout:
phux plugin link ./phux-plugin/phux-plugin.toml
phux plugin enable phui
phux launch phui --target @7 --split vertical -c /path/to/repo -- \
owner/repo#123 --view diffThe template runs phui in the directory where phux launch is invoked
(working_directory = "workspace"); -c overrides that workspace for the
example above. Homebrew installs the phui binary, not this optional phux
plugin.
Clone, install, and link:
git clone https://github.com/phall1/phui.git
cd phui
bun install
bun linkWith Nix flakes:
nix develop
bun install
bun run devPHUI_PR_FETCH_LIMIT: max PRs fetched, defaults to200PHUI_RUN_FETCH_LIMIT: max workflow runs fetched per PR or repository Actions view, defaults to20
Example:
PHUI_PR_FETCH_LIMIT=100 phuiYou can also copy .env.example to .env and edit the values locally.
phui stores UI preferences in config.json under PHUI_CONFIG_DIR when set,
otherwise under the platform config directory. On Linux this is normally
~/.config/phui/config.json.
Example:
{
"theme": "system",
"systemThemeAutoReload": true,
"showScrollbars": false
}systemThemeAutoReload defaults to false. Set it to true to let external
theme reload signals update the active system theme palette while phui is
running.
Scrollable panes hide their scrollbar rails by default. Set showScrollbars
to true to display them while retaining the same keyboard and mouse scrolling
behavior.
Press e on a pull request (in the list, detail, or diff view) to hand it off
to your editor. phui suspends the TUI, runs your command attached to the
terminal, and resumes when it exits.
Configure this in config.json:
{
"editorCommand": "tmux new-window -c {{repoPath}} 'gh pr checkout {{number}} && nvim -c \":DiffviewOpen {{baseRef}}...{{headRef}}\"'",
"repoPaths": {
"kitlangton/ghui": "~/code/ghui",
"kitlangton/*": "~/code/repos/kitlangton/*",
":owner/:repo": "~/src/github.com/:owner/:repo"
}
}repoPaths maps a repository to a local clone, matched in order: an exact
owner/repo key, then an owner wildcard (owner/*, where * becomes the repo
name), then the generic :owner/:repo template. ~ expands to your home
directory.
editorCommand is a shell command template with these substitutions:
{{repo}}— fullowner/repo{{owner}},{{name}}{{number}}— PR number{{headRef}}— PR head branch{{baseRef}}— base branch{{author}}{{url}}{{repoPath}}— resolved local path (requires a matchingrepoPathsentry)
If editorCommand is omitted, phui falls back to $VISUAL/$EDITOR opening
the resolved repoPath. Some common recipes:
Press w on a pull request (list or detail view) to check its head out into an
isolated git worktree and open a
phux session there — the primary clone's
checkout is never touched, and each PR gets its own session named
<repo>-pr-<number>.
- Outside phux, phui suspends the TUI and attaches to the session directly; detaching drops you back into phui.
- Inside phux (detected via
PHUX_TERMINAL_ID), the session is created detached and a footer notice tells you it's ready to switch to.
The local clone comes from the same repoPaths map used by open-in-editor.
The worktree fetches refs/pull/<number>/head from the remote matching the
PR's repository (so fork PRs work without adding the fork as a remote) and
checks it out on a local pr/<number> branch. Pressing w again on the same
PR reuses the existing worktree and session.
By default worktrees live at {{repoPath}}/.phui/worktrees/pr-{{number}}
(phui adds .phui/ to the clone's .git/info/exclude so they never appear in
git status). Override the location with a worktreePath template in
config.json, using the same substitutions as editorCommand:
{
"worktreePath": "~/worktrees/{{name}}/pr-{{number}}"
}Press 4 (or g n) for your GitHub notifications, grouped by what they want
from you rather than by repository or time:
- NEEDS YOU — review requested, approval requested, assigned, mentioned, team mentioned, invited
- YOUR THREADS — activity on things you opened
- CI — workflow activity
- SECURITY — Dependabot and advisory alerts
- WATCHING — everything you are merely subscribed to
enter opens a pull request in phui — the repository is scoped, the PR is
hydrated, and you land on its detail view, exactly as phui owner/repo#123
would. Issues open the repository's Issues surface; anything phui has no surface
for (releases, discussions) falls back to your browser.
dmarks a thread done,mmarks it read,shift-uunsubscribes.shift-amarks everything read.uwidens the list to threads you have already read;pnarrows it to threads you are participating in.rrefreshes; the surface also polls once a minute while it is visible.
The workspace tab strip carries the unread count, so phui tells you a review was
requested without you opening github.com to find out. Reading notifications
needs a gh token with the notifications scope — gh auth login grants it by
default, and the surface says so plainly if yours does not have it.
Press 5 (or g s) to browse everything you have starred, with star count,
language, description, and last-push age.
/filters as you type across name, description, language, and topics.scycles the sort: recently starred, recently pushed, most stars, name.enterscopes phui to the repository, so its pull requests, issues, and Actions are one keystroke away.oopens it in a browser,shift-uunstars it,rrefreshes.
phui reads the first 500 stars and tells you when it stopped there.
Open a repository and select its Actions tab to monitor recent workflow runs
across branches and events. Active runs refresh automatically while the surface
is visible. You can also press a on a pull request to open runs scoped to that
PR's head commit.
- The runs list shows each workflow, branch, status, conclusion, duration, and age.
enterdrills into a run to see its jobs and steps; failing steps are easy to spot.n/pjump between failures,oopens the run in your browser, andrrefreshes.Rreruns a completed workflow,Freruns failed jobs, andxcancels an active run.tab/shift-tabmove between repository surfaces;escwalks back through run detail and repository scope.
Requires the GitHub CLI (gh) the same as the rest of phui; nothing extra to configure.
up/down: move selectionk/j: move selectiongg/G: jump to first or last pull requestctrl-u/ctrl-d: page up or downtab/shift-tab: switch PR queue1–6: jump straight to a workspace surfaceg h/g p/g i/g n/g s: go to repos, pull requests, issues, inbox, starsctrl-p/cmd-k: open the command palette/: filterenter: expand details; normal PR actions still work while details are expandedesc: return from expanded details, leave diff/comment mode, or close modalr: refreshd: view stacked diff for all changed filesa: view this PR's GitHub Actions runsshift-r: review or approve the selected pull requestup/down/pageup/pagedown: move comment target while viewing a diffenter: open a commented diff line, or start a comment on an uncommented linev: start or clear a multi-line diff comment rangen/p: jump between diff comment threadsf: open the changed-files navigator while viewing a diffleft/right: choose the deleted or added side while in split diff comment mode[/]: switch files while viewing or commenting on a diffs: toggle draft or ready-for-review statem: mergex: close with confirmationt: choose a fixed theme, includingSystemto match your terminal colors; pressmin the theme picker to follow the OS light/dark appearance with separate theme choicesl: manage labelso: open PR in browsere: open PR in your editor (configurable; seeeditorCommand/repoPaths)y: copy PR metadataq: quit
Authored-only pull request views render compact one-line rows because the author identity is implied by the active view. Mixed-author views continue to show the author and branch metadata row.
Review submission:
- Press
shift-rto open the review modal. - Use
j/korup/downto choose Comment, Approve, or Request changes. - Press
enterto move to the optional summary area. - Press
enteragain to submit, orshift-enterto insert a newline. - Press
escfrom the summary to return to action selection; pressescfrom action selection to cancel.
phui is a fork of ghui, created by Kit Langton. Kit wrote the application: the PR, issue, and diff surfaces, the review flow, the keyboard model, the theming, and the overall design that makes it worth using at all. Everything below is a layer on top of that work, and the credit for the tool belongs to him.
What this fork adds:
- A repository Actions dashboard, and Inbox, Stars, and Projects surfaces (the last a portfolio linter over local repos)
- Handoff into phux — open a PR directly in a
phux worktree session with
w, plus agent cockpit handoff - Packaging for my own setup: standalone binaries, a
phall1/tapHomebrew formula, scoped npm publishing, and automated releases
It exists as a fork rather than as pull requests because most of it is wired to my own tooling — phux handoff in particular — which is a reasonable thing for upstream not to carry. Nothing here is a criticism of the original, and if any of it is useful to Kit, it's his to take.
Licensed MIT, under the original copyright — see LICENSE.