Skip to content

A modern terminal-based Git interface inspired by lazygit, built with Rust and featuring an htop-style dashboard. Navigate your repositories with keyboard shortcuts and perform Git operations efficiently.

License

Notifications You must be signed in to change notification settings

guicybercode/gitrustui

Repository files navigation

GUI Git - Terminal Git Interface

A modern terminal-based Git interface inspired by lazygit, built with Rust and featuring an htop-style dashboard. Navigate your repositories with keyboard shortcuts and perform Git operations efficiently.

Repository: gitrustui | Author: @guicybercode

Features

  • Multi-Repository Support: Work with multiple Git repositories simultaneously
  • Split-Screen Layout: View repositories, branches, commits, and status in organized panels
  • Keyboard Navigation: Full keyboard control with intuitive shortcuts
  • Theme Support: 5 beautiful themes (Nord, Dracula, Gruvbox, Monokai, Solarized)
  • Git Operations: Stage, commit, push, pull, merge, and stash operations
  • GitHub Integration: Clone repositories, view Pull Requests and Issues
  • Visual Branch Tree: See your branch structure at a glance
  • Status Visualization: Clear indication of staged, modified, and untracked files
  • Persistent Configuration: Remembers your repositories and theme preferences
  • Real-time Clone: Clone repositories directly from GitHub URLs

Installation

Prerequisites

  • Rust 1.70+
  • Git 2.0+

System Requirements

Platform Minimum Recommended
Windows Windows 10 Windows 11
macOS macOS 10.15 macOS 12+
Linux Ubuntu 18.04 Ubuntu 20.04+
RAM 512MB 2GB+
Storage 100MB 1GB+
Terminal Any Modern terminal with Unicode support

Build from Source

git clone https://github.com/guicybercode/gitrustui.git
cd gitrustui
cargo build --release

The binary will be available at target/release/gui-git.

Installation Methods

Windows

# Using PowerShell
git clone https://github.com/guicybercode/gitrustui.git
cd gitrustui
cargo build --release
# Binary will be at target\release\gui-git.exe

macOS

# Using Homebrew (if available)
brew install rust
git clone https://github.com/guicybercode/gitrustui.git
cd gitrustui
cargo build --release
# Binary will be at target/release/gui-git

Linux

# Ubuntu/Debian
sudo apt update
sudo apt install build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/guicybercode/gitrustui.git
cd gitrustui
cargo build --release
# Binary will be at target/release/gui-git

Usage

Quick Start

# Run the application
gui-git

# Basic workflow:
# 1. Press 'a' to add a repository
# 2. Press 'Shift+G' to configure GitHub (optional)
# 3. Press 'Shift+C' to clone a repository
# 4. Use 'Tab' to navigate between panels
# 5. Press 's' to stage files, 'c' to commit
# 6. Press 'p' to push changes

Basic Navigation

gui-git

Keyboard Shortcuts

Navigation

  • / or j / k - Navigate lists
  • / or h / l - Navigate horizontally
  • Tab - Switch between panels
  • Enter - Select item

Git Operations

  • s - Stage/unstage file
  • c - Commit changes (opens commit message input)
  • p - Push changes
  • Shift+P - Pull changes
  • m - Merge branch
  • z - Stash changes (opens stash message input)
  • x - Clear message bar

GitHub Integration

  • Shift+C - Clone repository from URL
  • Shift+P - View Pull Requests
  • Shift+I - View Issues
  • Shift+G - Configure GitHub token and username
  • Shift+S - Online synchronization

UI Controls

  • t - Switch theme
  • ? - Show help
  • q - Quit application
  • r - Refresh current repository
  • a - Add repository
  • g - Git graph view
  • d - Diff viewer
  • S - Settings

Modal Controls (when in modals)

  • Enter - Confirm/Save
  • Esc - Cancel/Close
  • Tab - Switch between input fields (GitHub config)
  • h - Toggle help (GitHub config)
  • Backspace - Delete character

Keyboard Shortcuts Summary

Category Shortcut Action
Navigation / or j/k Navigate lists
/ or h/l Navigate horizontally
Tab Switch between panels
Enter Select item
Git Operations s Stage/unstage file
c Commit changes
p Push changes
Shift+P Pull changes
m Merge branch
z Stash changes
x Clear message bar
GitHub Shift+C Clone repository
Shift+P View Pull Requests
Shift+I View Issues
Shift+G Configure GitHub
Shift+S Online sync
UI t Switch theme
? Show help
q Quit application
r Refresh repository
a Add repository

Panels

Left Column

  1. Repository List - View and switch between your Git repositories
  2. Branch List - See all branches (local and remote) with current branch highlighted

Middle Column

  1. Commit History - Browse recent commits with author and date information
  2. Status Panel - View file changes (staged, modified, untracked)
  3. Stash List - Manage your stashes

Right Column (Online Features)

  1. Pull Requests - View and manage GitHub Pull Requests
  2. Issues - View and manage GitHub Issues
  3. GitHub Repositories - Browse your GitHub repositories

Configuration

Configuration is automatically saved to ~/.config/gui-git/config.toml (or equivalent on Windows).

Example Configuration

theme = "nord"
repositories = [
    "/path/to/repo1",
    "/path/to/repo2"
]
last_active_repo = "/path/to/repo1"

[github_config]
token = "ghp_your_github_token_here"
username = "your_github_username"
api_url = "https://api.github.com"

Configuration Options

Option Type Description Default
theme String UI theme name "nord"
repositories Array List of repository paths []
last_active_repo String Last active repository ""
github_config.token String GitHub Personal Access Token null
github_config.username String GitHub username null
github_config.api_url String GitHub API URL "https://api.github.com"

Available Themes

  • Nord - Clean, minimal design with cool colors
  • Dracula - Dark theme with vibrant accents
  • Gruvbox - Retro groove color scheme
  • Monokai - Classic monokai color palette
  • Solarized - Carefully designed for readability

GitHub Integration

Setup

  1. Press Shift+G to open GitHub configuration
  2. Enter your GitHub Personal Access Token
  3. Enter your GitHub username
  4. Press Enter to save

Getting a GitHub Token

  1. Go to GitHub.com → Settings → Developer settings
  2. Personal access tokens → Tokens (classic)
  3. Generate new token with 'repo' scope
  4. Copy the token and paste it in the configuration

Features

  • Clone Repositories: Press Shift+C and enter a GitHub URL
  • View Pull Requests: Press Shift+P to see PRs for the current repository
  • View Issues: Press Shift+I to see issues for the current repository
  • Browse Repositories: Access your GitHub repositories in the right panel

Examples

Clone a Repository

  1. Press Shift+C
  2. Enter: https://github.com/rust-lang/rust
  3. Press Enter
  4. Repository will be cloned to ./repos/rust

Configure GitHub

  1. Press Shift+G
  2. Enter your GitHub token
  3. Press Tab to switch to username field
  4. Enter your GitHub username
  5. Press Enter to save

Stage and Commit Changes

  1. Navigate to Status panel with Tab
  2. Select a file with /
  3. Press s to stage the file
  4. Press c to commit
  5. Enter commit message
  6. Press Enter to commit

Quick Reference

Essential Commands

  • q - Quit
  • ? - Help
  • Tab - Navigate panels
  • s - Stage file
  • c - Commit
  • p - Push

GitHub Commands

  • Shift+G - Configure GitHub
  • Shift+C - Clone repository
  • Shift+P - View PRs
  • Shift+I - View Issues

Navigation

  • / - Move up/down
  • / - Move left/right
  • Enter - Select
  • Esc - Cancel

Screenshots

Main Interface

┌─ GUI Git ──────────────────────────────────────────────────────────────┐
│ Repository: /path/to/repo                    Branch: main              │
├─────────────────┬─────────────────┬─────────────────────────────────────┤
│ Repositories    │ Commits         │ Pull Requests                      │
│ ├─ repo1        │ abc1234 feat    │ #123 Add new feature              │
│ ├─ repo2        │ def5678 fix     │ #124 Fix bug                      │
│ └─ repo3        │ ghi9012 docs    │ #125 Update README                │
├─────────────────┼─────────────────┼─────────────────────────────────────┤
│ Branches        │ Status           │ Issues                             │
│ ├─ main*        │ M  file1.rs     │ #67 Bug report                    │
│ ├─ feature/A    │ A  file2.rs     │ #68 Feature request               │
│ └─ feature/B    │ ?? file3.rs     │ #69 Documentation                 │
├─────────────────┼─────────────────┼─────────────────────────────────────┤
│ Stash           │                 │ GitHub Repos                       │
│ ├─ WIP: feat    │                 │ ├─ user/repo1                     │
│ └─ WIP: fix     │                 │ ├─ user/repo2                     │
└─────────────────┴─────────────────┴─────────────────────────────────────┘
│ Press '?' for help, 'q' to quit                    made by gui기กีギ    │
└─────────────────────────────────────────────────────────────────────────┘

GitHub Configuration Modal

┌─ GitHub Configuration ────────────────────────────────────────────────┐
│ GitHub Token: ••••••••                                                │
│ Username: your_username                                               │
│                                                                       │
│ Enter: Save | Tab: Switch Field | Esc: Cancel                        │
│                                                                       │
│ How to get a GitHub token:                                            │
│ 1. Go to GitHub.com → Settings → Developer settings                  │
│ 2. Personal access tokens → Tokens (classic)                         │
│ 3. Generate new token with 'repo' scope                              │
│ 4. Copy the token and paste it here                                  │
└───────────────────────────────────────────────────────────────────────┘

Architecture

The application is built as a multi-crate Rust workspace:

  • gui-git - Main binary application
  • gui-git-core - Core Git operations and configuration
  • gui-git-ui - UI components and rendering

Dependencies

  • tui-rs - Terminal user interface framework
  • crossterm - Cross-platform terminal manipulation
  • git2-rs - Git operations via libgit2
  • serde - Serialization framework
  • anyhow - Error handling
  • reqwest - HTTP client for GitHub API
  • tokio - Async runtime for GitHub operations
  • uuid - Unique identifiers for repositories

Development

Project Structure

rust_git/
├── Cargo.toml              # Workspace manifest
├── gui-git/                # Main application
│   ├── Cargo.toml
│   └── src/main.rs
├── gui-git-core/           # Core library
│   ├── Cargo.toml
│   └── src/
│       ├── lib.rs
│       ├── config.rs
│       ├── git_ops.rs
│       └── repository.rs
└── gui-git-ui/             # UI library
    ├── Cargo.toml
    └── src/
        ├── lib.rs
        ├── app.rs
        ├── components.rs
        ├── layout.rs
        └── theme.rs

Building

# Build all crates
cargo build

# Build with optimizations
cargo build --release

# Run tests
cargo test

# Run the application
cargo run --bin gui-git

Testing

Running Tests

# Run all tests
cargo test

# Run tests for specific crate
cargo test -p gui-git-core
cargo test -p gui-git-ui

# Run tests with output
cargo test -- --nocapture

Test Coverage

  • Unit Tests: Core Git operations and configuration
  • Integration Tests: UI components and event handling
  • Manual Testing: GitHub integration and cloning

Test Data

  • Use test repositories for development
  • Mock GitHub API responses for testing
  • Test with different Git repository states

Deployment

Building for Production

# Build optimized release
cargo build --release

# Binary location
# Windows: target\release\gui-git.exe
# Unix: target/release/gui-git

Distribution

  • Windows: Create installer or portable executable
  • macOS: Create .app bundle or Homebrew formula
  • Linux: Create .deb/.rpm packages or AppImage

CI/CD

  • Automated testing on multiple platforms
  • Automated builds for releases
  • Automated deployment to package managers

Troubleshooting

Common Issues

GitHub Integration not working:

  • Make sure you have a valid GitHub Personal Access Token
  • Check that the token has 'repo' scope permissions
  • Verify your username is correct

Clone fails:

  • Ensure you have Git installed and configured
  • Check that the repository URL is valid
  • Verify you have write permissions to the destination directory

UI not responding:

  • Press x to clear any error messages
  • Press r to refresh the current repository
  • Press q to quit and restart the application

Theme not changing:

  • Press t to cycle through available themes
  • Check the configuration file for theme settings

Performance Tips

For large repositories:

  • Use r to refresh only when needed
  • Consider using x to clear messages if UI becomes slow
  • Close unused repositories to free memory

For GitHub integration:

  • Configure your GitHub token for better performance
  • Use Shift+S for online sync to keep data fresh
  • Press Shift+P and Shift+I to load PRs and Issues on demand

Known Issues

Current Limitations

  • Async Operations: GitHub API calls are not fully asynchronous yet
  • Large Repositories: Performance may be slow with very large repositories
  • Network Issues: No retry logic for failed GitHub API calls
  • Theme Customization: No way to create custom themes yet

Workarounds

  • Use r to refresh if operations seem stuck
  • Close unused repositories to improve performance
  • Check your internet connection for GitHub operations
  • Use default themes for now

Tips and Tricks

Productivity Tips

  • Use Tab to quickly switch between panels
  • Press x to clear error messages and keep UI clean
  • Use r to refresh when Git operations seem stuck
  • Configure GitHub once with Shift+G for seamless integration

Keyboard Shortcuts

  • Shift+ combinations are for GitHub features
  • Single letters are for Git operations
  • Arrow keys work in all panels
  • Esc always cancels current operation

Workflow Tips

  • Start by adding repositories with a or cloning with Shift+C
  • Stage files with s, then commit with c
  • Use z to stash work in progress
  • Check PRs and Issues with Shift+P and Shift+I

Performance Metrics

Operation Time Memory Usage
Startup < 1s ~10MB
Repository Load < 500ms +5MB per repo
GitHub API Call 1-3s +2MB
Repository Clone 5-30s +10-100MB
Theme Switch < 100ms No change
Panel Navigation < 50ms No change

FAQ

Q: How do I add a new repository? A: Press a to add a repository, or Shift+C to clone from GitHub.

Q: Can I use this with private repositories? A: Yes! Configure your GitHub token with Shift+G to access private repositories.

Q: How do I switch between themes? A: Press t to cycle through available themes.

Q: What if I forget the keyboard shortcuts? A: Press ? to see the help screen with all available shortcuts.

Q: Can I customize the keyboard shortcuts? A: Not yet, but this feature is planned for v0.3.0.

Q: Does this work on Windows/Mac/Linux? A: Yes! The application is cross-platform and works on all major operating systems.

Q: How do I report bugs or request features? A: Please open an issue on GitHub with detailed information about the problem or feature request.

Support

Getting Help

  • Documentation: Check this README for common questions
  • Issues: Open a GitHub issue for bugs or feature requests
  • Discussions: Use GitHub Discussions for questions and ideas
  • Help in App: Press ? to see keyboard shortcuts

Reporting Issues

When reporting issues, please include:

  • Operating system and version
  • Rust version (rustc --version)
  • Git version (git --version)
  • Steps to reproduce the problem
  • Expected vs actual behavior
  • Screenshots if applicable

Contributing

We welcome contributions! Please see the Contributing section for details.

Community

Community Guidelines

  • Be respectful and inclusive
  • Follow the code of conduct
  • Help others learn and grow
  • Share your experiences and tips

Security

GitHub Token Security

  • Your GitHub token is stored locally in the configuration file
  • The token is never transmitted to any third-party services
  • Use a Personal Access Token with minimal required permissions
  • Regularly rotate your GitHub token for security

Data Privacy

  • All Git operations are performed locally
  • Repository data is not sent to external services
  • Configuration files are stored in your local user directory
  • No telemetry or usage data is collected

Migration

Upgrading from v0.1.0 to v0.2.0

  • Configuration format remains compatible
  • New GitHub configuration section added
  • No breaking changes to existing functionality

Configuration Migration

  • Old configurations will work without changes
  • GitHub features require new configuration section
  • Themes and repositories are preserved

Data Migration

  • Repository paths are preserved
  • Theme preferences are maintained
  • No data loss during upgrade

Glossary

Term Definition
TUI Terminal User Interface - text-based interface
Git Version control system for tracking changes
Repository Storage location for Git project data
Branch Parallel version of code development
Commit Snapshot of changes in Git history
Stage Prepare changes for commit
Stash Temporarily save uncommitted changes
PR Pull Request - proposed changes to repository
Issue Bug report or feature request
API Application Programming Interface
Token Authentication credential for API access

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Changelog

v0.2.0 - GitHub Integration

  • Real Repository Cloning: Clone repositories directly from GitHub URLs
  • GitHub Configuration Modal: Configure GitHub token and username
  • Pull Requests Panel: View and manage GitHub Pull Requests
  • Issues Panel: View and manage GitHub Issues
  • GitHub Repositories Panel: Browse your GitHub repositories
  • Enhanced Keyboard Shortcuts: New shortcuts for online features
  • 3-Column Layout: Dedicated space for online features

v0.1.0 - Initial Release

  • Multi-Repository Support: Work with multiple Git repositories
  • Split-Screen Layout: Organized panels for different Git views
  • Theme Support: 5 beautiful themes
  • Git Operations: Stage, commit, push, pull, merge, stash
  • Keyboard Navigation: Full keyboard control
  • Persistent Configuration: Save settings and repositories

Version History

Version Date Major Changes
v0.2.0 2024 GitHub integration, real cloning, 3-column layout
v0.1.0 2024 Initial release, basic Git operations, themes

Development Status

Feature Status Progress
Core Git Operations ✅ Complete 100%
Multi-Repository Support ✅ Complete 100%
Theme System ✅ Complete 100%
GitHub Integration ✅ Complete 100%
Repository Cloning ✅ Complete 100%
Pull Requests Panel ✅ Complete 100%
Issues Panel ✅ Complete 100%
GitHub Configuration ✅ Complete 100%
Async Operations 🔄 In Progress 50%
Git Graph Visualization 🔄 In Progress 30%
Diff Viewer 🔄 In Progress 30%
Custom Keybindings 📋 Planned 0%
Plugin System 📋 Planned 0%

Roadmap

v0.3.0 - Advanced Features

  • 🔄 Async GitHub Operations: Real-time PR and Issue loading
  • 🔄 Git Graph Visualization: Interactive commit graph
  • 🔄 Diff Viewer: Side-by-side diff visualization
  • 🔄 Custom Keybindings: User-configurable shortcuts
  • 🔄 Plugin System: Extensible architecture

v0.4.0 - Multi-Platform Support

  • 🔄 GitLab Integration: Support for GitLab repositories
  • 🔄 Bitbucket Integration: Support for Bitbucket repositories
  • 🔄 Auto-Sync: Background synchronization
  • 🔄 Notifications: Real-time updates and alerts

Future Versions

  • 🔄 Collaborative Features: Real-time collaboration
  • 🔄 Advanced Search: Search across repositories
  • 🔄 Performance Optimization: Faster operations
  • 🔄 Mobile Support: Touch-friendly interface

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Special Thanks

  • The Rust community for excellent tooling and documentation
  • Contributors who help improve the project
  • Users who provide feedback and bug reports

Credits

  • Author: guicybercode (GitHub: @guicybercode)
  • Repository: gitrustui
  • Version: 0.2.0
  • License: BSD-3-Clause
  • Language: Rust
  • App Signature: gui기กีギ (unique visual identity)

Related Projects

Similar Tools

  • lazygit - Simple terminal UI for Git
  • gitui - Fast terminal UI for Git
  • tig - Text-mode interface for Git
  • git-delta - Syntax-highlighting pager for Git

Rust TUI Libraries

Git Libraries

  • git2-rs - Git operations via libgit2
  • gitoxide - Pure Rust Git implementation

Appendix

A. Keyboard Shortcuts Reference

Complete Shortcut List

Key Action Context
q Quit application Global
? Show help Global
t Switch theme Global
r Refresh repository Global
a Add repository Global
x Clear message Global
Tab Switch panels Navigation
/ Navigate up/down Lists
/ Navigate left/right Panels
Enter Select item Lists
Esc Cancel/Close Modals
s Stage/unstage file Status panel
c Commit changes Global
p Push changes Global
Shift+P Pull changes Global
m Merge branch Branches
z Stash changes Global
g Git graph Global
d Diff viewer Global
S Settings Global
Shift+C Clone repository Global
Shift+P View PRs GitHub
Shift+I View Issues GitHub
Shift+G Configure GitHub Global
Shift+S Online sync Global

B. Configuration File Locations

Platform Path
Windows %APPDATA%\gui-git\config.toml
macOS ~/.config/gui-git/config.toml
Linux ~/.config/gui-git/config.toml

C. Environment Variables

Variable Description Default
GUI_GIT_CONFIG_DIR Custom config directory Platform default
GUI_GIT_THEME Default theme nord
GITHUB_TOKEN GitHub token (fallback) None

D. Exit Codes

Code Meaning
0 Success
1 General error
2 Configuration error
3 Git operation error
4 GitHub API error

"하나님이 세상을 이처럼 사랑하사 독생자를 주셨으니 이는 그를 믿는 자마다 멸망하지 않고 영생을 얻게 하려 하심이라"
"For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life."
John 3:16

About

A modern terminal-based Git interface inspired by lazygit, built with Rust and featuring an htop-style dashboard. Navigate your repositories with keyboard shortcuts and perform Git operations efficiently.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages