Skip to content

KDM-cli/ghx

Repository files navigation

🛸 ghx

AI-Powered GitHub Workflow TUI Assistant

MIT License go

A fast, keyboard-driven Terminal User Interface (TUI) tool written in Go to automate your Git and GitHub workflows with integrated offline and cloud AI generation.


🌟 Key Features

⌨️ Keyboard-Driven UI

Seamless navigation with arrow keys and shortcut keys. No complex command syntax to memorize.

🤖 Deep AI Integration

Generate highly descriptive conventional commits, PR titles, and descriptions dynamically from actual diff statistics.

🔌 Multi-Provider AI Engine

Supports both local/offline providers (Ollama, LM Studio, MLX) and cloud providers (OpenAI, Claude).

📦 Remote Target Control

Resolve and toggle PR target repositories (e.g., origin fork vs upstream parent) and configure missing remotes right in the TUI.


🚀 Installation

Prerequisites

1. Direct Binary Installation (macOS & Linux)

You can install the latest pre-compiled binary with a single script that detects your OS and architecture:

curl -sSfL https://raw.githubusercontent.com/KDM-cli/ghx/main/install.sh | sh

(Alternatively, you can manually download the correct archive for your platform from the GitHub Releases page).

2. Via Homebrew (macOS & Linux)

Add the custom tap and install ghx:

brew tap KDM-cli/tap
brew install ghx

3. Via Go Install (Developers)

If you have Go 1.21 or higher installed:

go install github.com/KDM-cli/ghx@latest

4. Build from Source

# Clone the repository
git clone https://github.com/KDM-cli/ghx.git
cd ghx

# Build the binary
go build -o ghx .

⚙️ AI Configuration

Local/Offline Models (Ollama)

We recommend running Ollama locally for a private, zero-latency offline workflow.

# Install and start Ollama, then pull llama3
ollama pull llama3

Configure Settings

  1. Launch ./ghx.
  2. Navigate to Settings and select your preferred active AI provider.
  3. Configure API Keys (for cloud providers) or choose custom models inline by pressing m.

⌨️ Keyboard Bindings

Navigation & General controls
Key Description
↑ / ↓ or k / j Navigate options / scroll lists
Tab / Shift+Tab Focus next / previous section or step
Enter Select menu option or confirm step
Esc or b Go back to previous screen or step
q Quit application (from Home Screen)
? Toggle Help view
Contextual Actions
Key Context Description
Space Commit Stage list Toggle staged state of selected file
a / n Commit Stage list Stage all files / unstage all files
g Commit / PR screens Generate suggestions using the configured AI model
t PR review Toggle target repository (e.g. upstream <-> origin)
u PR review Set/add a new upstream remote repository
d PR review Toggle Draft state of the pull request
1 - 3 Commit AI suggestions Select the corresponding AI suggestion
r Commit AI suggestions Regenerate AI suggestions

📄 License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors