Convert Figma logo to code with AI

extrawurst logogitui

Blazing 💥 fast terminal-ui for git written in rust 🦀

18,189
553
18,189
203

Top Related Projects

52,000

simple terminal UI for git commands

37,027

GitHub’s official command line tool

172,325

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

git-cola: The highly caffeinated Git GUI

6,562

It's Magit! A Git Porcelain inside Emacs.

12,424

Text-mode interface for git

Quick Overview

GitUI is a blazing fast terminal-based user interface for Git, written in Rust. It provides an intuitive and efficient way to interact with Git repositories directly from the command line, offering a visual alternative to traditional Git commands.

Pros

  • Fast and responsive, thanks to its Rust implementation
  • Intuitive and user-friendly interface for Git operations
  • Cross-platform support (Linux, macOS, Windows)
  • Customizable key bindings and color schemes

Cons

  • Limited advanced Git features compared to GUI clients
  • Steeper learning curve for users unfamiliar with terminal-based interfaces
  • Requires Rust installation for building from source

Getting Started

To install GitUI, you can use one of the following methods:

  1. Using Homebrew (macOS and Linux):

    brew install gitui
    
  2. Using Cargo (Rust package manager):

    cargo install gitui
    
  3. Download pre-built binaries from the GitHub releases page.

Once installed, navigate to a Git repository in your terminal and run:

gitui

This will launch the GitUI interface, where you can start managing your Git repository using the visual interface and keyboard shortcuts.

Competitor Comparisons

52,000

simple terminal UI for git commands

Pros of lazygit

  • Written in Go, which may offer better performance and easier installation on some systems
  • More feature-rich, including interactive rebase and submodule management
  • Larger community and more frequent updates

Cons of lazygit

  • Steeper learning curve due to more complex interface and features
  • Larger resource footprint, which may impact performance on older systems

Code comparison

lazygit (Go):

func (gui *Gui) handleCommitConfirm() error {
    message := gui.State.CommitMessage
    if message == "" {
        return gui.createErrorPanel(gui.Tr.NoCommitMessageErr)
    }
    return gui.GitCommand.Commit(message)
}

gitui (Rust):

fn draw_commit_message(&self, f: &mut Frame<B>, r: Rect) {
    let input = Paragraph::new(self.input.as_str())
        .block(Block::default().borders(Borders::ALL).title("Commit message"));
    f.render_widget(input, r);
}

Both projects aim to provide a terminal-based interface for Git operations, but they differ in implementation language and feature set. lazygit offers more advanced features at the cost of complexity, while gitui focuses on simplicity and performance. The choice between them depends on user preferences and system requirements.

37,027

GitHub’s official command line tool

Pros of cli

  • Official GitHub CLI tool with extensive GitHub-specific features
  • Cross-platform support (Windows, macOS, Linux)
  • Seamless integration with GitHub's web interface and API

Cons of cli

  • Focused solely on GitHub, limiting its use for other Git hosting platforms
  • Steeper learning curve for users unfamiliar with GitHub's ecosystem
  • Larger installation size due to comprehensive feature set

Code comparison

cli:

gh repo create my-project --public
gh issue create --title "Bug report" --body "Description of the bug"
gh pr create --title "New feature" --body "Implementation details"

gitui:

# No direct equivalent for repository creation
# Navigate to the "Issues" tab and use interactive UI to create an issue
# Navigate to the "Pull Requests" tab and use interactive UI to create a PR

Summary

cli is the official GitHub CLI tool, offering extensive GitHub-specific features and seamless integration with the platform. It's cross-platform but focused solely on GitHub. gitui, on the other hand, is a lightweight, fast TUI for Git operations, not limited to any specific Git hosting service. While cli provides a command-line interface, gitui offers an interactive terminal-based UI for Git operations.

172,325

🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool that makes it easy to keep up with the latest updates from the community.

Pros of Oh My Zsh

  • Extensive plugin ecosystem with over 300 built-in plugins
  • Large and active community, providing frequent updates and support
  • Customizable themes for enhancing terminal appearance

Cons of Oh My Zsh

  • Can slow down terminal startup time, especially with many plugins enabled
  • Primarily focused on Zsh shell, limiting its use for other shell environments
  • Steeper learning curve for users new to shell customization

Code Comparison

Oh My Zsh (theme customization):

ZSH_THEME="robbyrussell"
plugins=(git docker kubectl)
source $ZSH/oh-my-zsh.sh

GitUI (key binding configuration):

[[keybindings]]
key = "ctrl-r"
action = "reset_commit"

[[keybindings]]
key = "ctrl-u"
action = "stash_open"

Oh My Zsh is a framework for managing Zsh configurations, offering a wide range of plugins and themes to enhance the terminal experience. GitUI, on the other hand, is a blazing-fast terminal user interface for Git, focusing on efficient Git operations rather than general shell enhancements.

While Oh My Zsh provides extensive customization options for Zsh, GitUI offers a streamlined, keyboard-driven interface specifically for Git operations. Oh My Zsh may impact terminal performance, whereas GitUI is designed for speed and efficiency in Git workflows.

git-cola: The highly caffeinated Git GUI

Pros of git-cola

  • Cross-platform GUI with a more traditional desktop application interface
  • Offers a wider range of features, including visual diff, blame, and stash management
  • Supports custom GUI actions and keyboard shortcuts for advanced users

Cons of git-cola

  • Larger resource footprint and slower startup time
  • Steeper learning curve due to more complex interface and numerous features
  • Requires Python and Qt dependencies, which may be challenging for some users to set up

Code comparison

git-cola (Python):

from PyQt5 import QtWidgets
from cola import qtutils

class GitColaMainWindow(QtWidgets.QMainWindow):
    def __init__(self, parent=None):
        super(GitColaMainWindow, self).__init__(parent)
        # ... more initialization code ...

gitui (Rust):

use tui::widgets::{Block, Borders};
use tui::layout::{Layout, Constraint, Direction};

fn ui<B: Backend>(f: &mut Frame<B>, app: &App) {
    let chunks = Layout::default()
        .direction(Direction::Vertical)
        .constraints([Constraint::Percentage(10), Constraint::Percentage(90)].as_ref())
        .split(f.size());
    // ... more UI rendering code ...
}
6,562

It's Magit! A Git Porcelain inside Emacs.

Pros of Magit

  • Deeply integrated with Emacs, offering a seamless Git workflow within the editor
  • Extensive feature set, covering almost all Git operations and advanced functionalities
  • Highly customizable and extensible through Emacs Lisp

Cons of Magit

  • Steep learning curve, especially for users not familiar with Emacs
  • Limited to Emacs environment, not usable as a standalone application

Code Comparison

Magit (Emacs Lisp):

(magit-status)
(magit-stage-file "file.txt")
(magit-commit-create)

GitUI (Rust):

let mut app = App::default();
app.draw()?;
app.process_events()?;

Key Differences

  • GitUI is a standalone TUI application, while Magit is an Emacs package
  • GitUI focuses on simplicity and ease of use, while Magit offers more advanced features
  • Magit leverages Emacs' extensibility, whereas GitUI is more self-contained
  • GitUI is written in Rust, potentially offering better performance for large repositories

Use Cases

  • Magit: Ideal for Emacs users who want deep Git integration within their editor
  • GitUI: Suitable for users who prefer a lightweight, standalone Git interface across different environments

Both tools aim to improve Git workflow efficiency, but cater to different user preferences and environments.

12,424

Text-mode interface for git

Pros of tig

  • Written in C, which can offer better performance and lower resource usage
  • Longer development history and more mature codebase
  • Extensive customization options through configuration files

Cons of tig

  • Less intuitive user interface for newcomers
  • Limited mouse support, primarily keyboard-driven
  • Slower development pace and less frequent updates

Code comparison

tig (C):

static enum status_code open_repo(void)
{
    const char *gitdir;

    gitdir = getenv("GIT_DIR");
    if (!gitdir)
        gitdir = ".git";

    return git_repository_open(&repo, gitdir);
}

gitui (Rust):

pub fn new(repo_path: &Path) -> Result<Self> {
    let repo = Repository::open(repo_path)?;
    let head = repo.head()?;
    let branch = head.shorthand().unwrap_or("HEAD").to_string();
    Ok(Self { repo, branch })
}

Both examples show repository opening functions, but gitui's Rust implementation is more concise and leverages Rust's error handling. tig's C code requires more explicit error checking and memory management.

gitui offers a more modern, user-friendly interface with full mouse support and a faster development cycle. It's written in Rust, providing memory safety and concurrency benefits. However, tig has a longer history, more customization options, and potentially better performance due to its C implementation.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

CI crates MIT UNSAFE TWEET dep_status discord

GitUI provides you with the comfort of a git GUI but right in your terminal

Table of Contents

  1. Features
  2. Motivation
  3. Benchmarks
  4. Roadmap
  5. Limitations
  6. Installation
  7. Build
  8. FAQs
  9. Diagnostics
  10. Color Theme
  11. Key Bindings
  12. Sponsoring
  13. Inspiration
  14. Contributing
  15. Contributors

1. Features Top ▲

  • Fast and intuitive keyboard only control
  • Context based help (no need to memorize tons of hot-keys)
  • Inspect, commit, and amend changes (incl. hooks: pre-commit,commit-msg,post-commit,prepare-commit-msg)
  • Stage, unstage, revert and reset files, hunks and lines
  • Stashing (save, pop, apply, drop, and inspect)
  • Push / Fetch to / from remote
  • Branch List (create, rename, delete, checkout, remotes)
  • Browse / Search commit log, diff committed changes
  • Responsive terminal UI
  • Async git API for fluid control
  • Submodule support
  • gpg commit signing with shortcomings (see #97))

2. Motivation Top ▲

I do most of my git work in a terminal but I frequently found myself using git GUIs for some use-cases like: index, commit, diff, stash, blame and log.

Unfortunately popular git GUIs all fail on giant repositories or become unresponsive and unusable.

GitUI provides you with the user experience and comfort of a git GUI but right in your terminal while being portable, fast, free and opensource.

3. Benchmarks Top ▲

For a RustBerlin meetup presentation (slides) I compared lazygit,tig and gitui by parsing the entire Linux git repository (which contains over 900k commits):

TimeMemory (GB)Binary (MB)FreezesCrashes
gitui24 s ✅0.17 ✅10No ✅No ✅
lazygit57 s2.625YesSometimes
tig4 m 20 s1.30.6 ✅SometimesNo ✅

4. Road(map) to 1.0 Top ▲

These are the high level goals before calling out 1.0:

  • visualize branching structure in log tab (#81)
  • interactive rebase (#32)

5. Known Limitations Top ▲

  • no sparse repo support (see #1226)
  • no git-lfs support (see #1089)
  • credential.helper for https needs to be explicitly configured (see #800)

Currently, this tool does not fully substitute the git shell, however both tools work well in tandem.

The priorities for gitui are on features that are making me mad when done on the git shell, like stashing, staging lines or hunks. Eventually, I will be able to work on making gitui a one stop solution - but for that I need help - this is just a spare time project for now.

All support is welcomed! Sponsors as well! ❤️

6. Installation Top ▲

GitUI is in beta and may contain bugs and missing features. However, for personal use it is reasonably stable and is being used while developing itself.

Packaging status

Various Package Managers

Install Instructions
Arch Linux
pacman -S gitui
Fedora
sudo dnf install gitui
Gentoo

Available in dm9pZCAq overlay

sudo eselect repository enable dm9pZCAq
sudo emerge --sync dm9pZCAq
sudo emerge dev-vcs/gitui::dm9pZCAq
openSUSE
sudo zypper install gitui
Homebrew (macOS)
brew install gitui
MacPorts (macOS)
port install gitui
Winget (Windows)
winget install gitui
Scoop (Windows)
scoop install gitui
Chocolatey (Windows)
choco install gitui
Nix (Nix/NixOS)

Nixpkg

nix-env -iA nixpkgs.gitui

NixOS

nix-env -iA nixos.gitui
Termux (Android)
pkg install gitui
Anaconda
conda install -c conda-forge gitui

Release Binaries

Available for download in releases

Binaries available for:

Linux

  • gitui-linux-x86_64.tar.gz (linux musl statically linked)
  • gitui-linux-aarch64.tar.gz (linux on 64 bit arm)
  • gitui-linux-arm.tar.gz
  • gitui-linux-armv7.tar.gz

All contain a single binary file

macOS

  • gitui-mac.tar.gz (arm64)
  • gitui-mac-x86.tar.gz (intel x86)

Windows

  • gitui-win.tar.gz (single 64bit binary)
  • gitui-win.msi (64bit Installer package)

Nightly Builds

see NIGHTLIES.md

7. Build Top ▲

Requirements

Cargo Install

The simplest way to start playing around with gitui is to have cargo build and install it with cargo install gitui --locked. If you are not familiar with rust and cargo: Getting Started with Rust

Cargo Features

trace-libgit

enable libgit2 tracing

works if libgit2 built with -DENABLE_TRACE=ON

this feature enabled by default, to disable: cargo install --no-default-features

8. FAQs Top ▲

see FAQs page

9. Diagnostics Top ▲

To run with logging enabled run gitui -l.

This will log to:

  • macOS: $HOME/Library/Caches/gitui/gitui.log
  • Linux using XDG: $XDG_CACHE_HOME/gitui/gitui.log
  • Linux: $HOME/.cache/gitui/gitui.log
  • Windows: %LOCALAPPDATA%/gitui/gitui.log

10. Color Theme Top ▲

gitui should automatically work on both light and dark terminal themes.

However, you can customize everything to your liking: See Themes.

11. Key Bindings Top ▲

The key bindings can be customized: See Key Config on how to set them to vim-like bindings.

12. Sponsoring Top ▲

github

13. Inspiration Top ▲

14. Contributing Top ▲

See CONTRIBUTING.md.

15. Contributors Top ▲

Thanks goes to all the contributors that help make GitUI amazing! ❤️

Wanna become a co-maintainer? We are looking for you!