Convert Figma logo to code with AI

gitui-org logogitui

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

19,289
601
19,289
224

Top Related Projects

55,342

simple terminal UI for git commands

19,281

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

38,009

GitHub’s official command line tool

12,557

Text-mode interface for git

manage your git repositories in one place

4,577

:zzz: A utility tool powered by fzf for using git interactively.

Quick Overview

GitUI is a blazingly 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

  • Steeper learning curve for users accustomed to GUI Git clients
  • Limited integration with external tools compared to some GUI alternatives
  • May not support all advanced Git features available in the command line

Getting Started

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

  1. Using Cargo (Rust package manager):

    cargo install gitui
    
  2. On macOS using Homebrew:

    brew install gitui
    
  3. On Windows using Scoop:

    scoop install gitui
    

After installation, 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

55,342

simple terminal UI for git commands

Pros of Lazygit

  • More feature-rich with advanced functionality like interactive rebase and submodule management
  • Highly customizable with keybindings and color schemes
  • Extensive documentation and active community support

Cons of Lazygit

  • Written in Go, which may have slower startup times compared to Gitui's Rust implementation
  • More complex interface, potentially steeper learning curve for new users
  • Larger binary size and memory footprint

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):

pub fn commit(&mut self) -> Result<()> {
    let msg = self.commit_msg.clone();
    if msg.is_empty() {
        return Err(Error::NoCommitMessage);
    }
    self.git_commit(msg)
}

Both repositories offer terminal-based Git interfaces, but with different approaches. Lazygit provides a more comprehensive feature set and customization options, while Gitui focuses on performance and a streamlined interface. The code snippets demonstrate similar commit functionality, with Lazygit using Go and Gitui using Rust.

19,281

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

Pros of gitui

  • No pros to list as this is the same repository

Cons of gitui

  • No cons to list as this is the same repository

Code comparison

There is no code comparison to make as gitui-org/gitui and gitui-org/gitui refer to the same repository. The repository gitui is a fast and efficient terminal-based Git user interface written in Rust. It provides a user-friendly way to interact with Git repositories from the command line.

Here's a sample of the main.rs file from gitui:

fn main() -> Result<()> {
    setup_logging()?;

    let args = cli::parse_args();

    if args.version {
        println!("gitui {}", env!("CARGO_PKG_VERSION"));
        return Ok(());
    }

    run_app(args)
}

This code snippet shows the entry point of the application, handling command-line arguments and initiating the main application loop.

38,009

GitHub’s official command line tool

Pros of cli

  • Official GitHub CLI tool with deep integration into GitHub's features
  • Supports a wider range of GitHub-specific actions (e.g., issues, pull requests)
  • Cross-platform compatibility (Windows, macOS, Linux)

Cons of cli

  • Focused on GitHub-specific operations, less useful for general Git tasks
  • Command-line interface may be less intuitive for visual learners
  • Requires an internet connection for most operations

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 "Details of the new feature"

gitui:

# No direct equivalent, as gitui is a terminal UI application
# Users navigate through menus and panels to perform actions
# Example: Press 'c' to commit, 'p' to push, etc.

gitui is a terminal-based user interface for Git, offering a more visual approach to Git operations. It focuses on local repository management and provides a responsive, keyboard-driven interface. cli, on the other hand, is specifically designed for GitHub interactions, offering a command-line approach to manage repositories, issues, and pull requests directly on the GitHub platform.

While cli excels in GitHub-specific tasks and automation, gitui provides a more intuitive interface for general Git operations, especially for users who prefer a visual representation of their repository's state. The choice between the two depends on whether the user prioritizes GitHub integration or a visual interface for local Git management.

12,557

Text-mode interface for git

Pros of tig

  • Lightweight and fast, with minimal resource usage
  • Highly customizable through configuration files
  • Extensive keyboard shortcuts for efficient navigation

Cons of tig

  • Less visually appealing interface compared to modern TUI alternatives
  • Limited mouse support, primarily keyboard-driven
  • Steeper learning curve for new users

Code comparison

tig:

void main_view_draw(struct view *view)
{
    struct line *line;
    int lineno;

    foreach_view_line (view, line, lineno) {
        draw_line(view, line, lineno);
    }
}

gitui:

fn draw_main_view(&mut self, f: &mut Frame<B>, area: Rect) {
    let chunks = Layout::default()
        .direction(Direction::Vertical)
        .constraints([Constraint::Min(0), Constraint::Length(1)].as_ref())
        .split(area);

    self.draw_commit_list(f, chunks[0]);
    self.draw_status_bar(f, chunks[1]);
}

The code snippets demonstrate the different approaches to drawing the main view in each application. tig uses C and focuses on iterating through lines, while gitui uses Rust and employs a more structured layout system with constraints.

manage your git repositories in one place

Pros of gitbatch

  • Focuses on batch operations for multiple Git repositories
  • Provides a simple, menu-driven interface for managing multiple repos
  • Supports custom commands and repository grouping

Cons of gitbatch

  • Less feature-rich for single repository management
  • Limited visualization capabilities compared to gitui
  • May be less intuitive for users familiar with traditional Git CLI

Code Comparison

gitbatch:

type App struct {
    Config     *config.Config
    RepoManager *repo.RepoManager
    UI         *ui.UI
}

gitui:

pub struct App {
    pub repo: Repository,
    pub config: Config,
    pub components: Components,
}

Both projects use a main App struct to manage the application state, but gitbatch focuses on managing multiple repositories, while gitui is designed for single repository interactions.

gitui offers a more comprehensive set of features for managing individual Git repositories, including a full-fledged TUI with diff viewing, branch management, and interactive staging. It provides a more polished and feature-rich experience for single repository workflows.

gitbatch, on the other hand, excels at managing multiple repositories simultaneously, making it ideal for developers working with microservices or maintaining multiple projects. Its simpler interface may be more approachable for users who prefer a straightforward, menu-driven approach to Git operations across multiple repositories.

4,577

:zzz: A utility tool powered by fzf for using git interactively.

Pros of forgit

  • Integrates seamlessly with existing shell environments
  • Provides interactive fuzzy-finding for various git commands
  • Lightweight and easy to install as a shell script

Cons of forgit

  • Limited to command-line interface, lacking graphical elements
  • Requires external dependencies like fzf for full functionality
  • May have a steeper learning curve for users unfamiliar with fuzzy-finding

Code Comparison

forgit:

# Example of interactive git add
ga() {
    git add -p $(gf)
}

gitui:

// Example of staging changes in gitui
pub fn stage_all(&mut self) -> Result<()> {
    self.git_status.stage_all()?;
    Ok(())
}

Key Differences

  • forgit enhances existing git commands with fuzzy-finding, while gitui provides a full terminal UI
  • forgit is a shell script, whereas gitui is a standalone Rust application
  • gitui offers a more comprehensive git management interface, while forgit focuses on enhancing specific git operations

Use Cases

  • forgit: Ideal for users who prefer working in the terminal and want to enhance their existing git workflow
  • gitui: Better suited for those who want a full-featured, interactive git interface within the terminal

Performance

  • forgit relies on external tools and may have variable performance based on system resources
  • gitui, being a compiled Rust application, generally offers faster and more consistent performance

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!