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

Overview

CI crates MIT UNSAFE ITCH DISC TWEET

Blazing fast terminal client for git written in Rust

Features

  • Fast and intuitive keyboard only control
  • Context based help (no need to memorize tons of hot-keys)
  • Inspect, commit, and amend changes (incl. hooks: commit-msg/post-commit)
  • Stage, unstage, revert and reset files and hunks
  • Stashing (save, apply, drop, and inspect)
  • Push to remote
  • Branch List (create, rename, delete)
  • Browse commit log, diff committed changes
  • Scalable terminal UI layout
  • Async input polling
  • Async git API for fluid control

Benchmarks

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

Time Memory (GB) Binary (MB) Freezes Crashes
gitui 24 s 0.17 1.4 No No
lazygit 57 s 2.6 16 Yes Sometimes
tig 4 m 20 s 1.3 0.6 Sometimes No

Motivation

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

Over the last 2 years my go-to GUI tool for this was fork because it was snappy, free, and not bloated. Unfortunately the free part will change soon and so I decided to build a fast and simple terminal tool to help with features I use the most.

Known Limitations

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

gitui currently lacks essential features in git like push, pull, and checkout. The priorities are the basics (add, commit), and on features that are making me mad when done on the git shell, like stashes and hunks. Eventually, I will be able to work on features that could lead to making gitui a one stop solution to get rid of the shell entirely - but for that I need help - this is just a spare time project right now.

All support is welcomed! Sponsors as well! ❤️

Installation

For the time being this product is in alpha and is not considered production ready. However, for personal use it is reasonably stable and is being used while developing itself.

Arch Linux

There is an AUR package for gitui:

git clone https://aur.archlinux.org/gitui.git
cd gitui
makepkg -si

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

Homebrew (macOS)

brew 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

Release Binaries

Available for download in releases

Binaries available for:

  • Linux
  • macOS
  • Windows

Build

Requirements

Cargo Install

The simplest way to start playing around with gitui is to have cargo build and install it with cargo install gitui

Diagnostics

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

Color Theme

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

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

Key Bindings

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

Road(map) to 1.0

These are the high level goals before calling out 1.0:

  • upstream branches (#453)
  • simple pull (only for ff-merge) (#319)
  • merging with conflicts (#485)
  • log search (commit, author, sha) (#449,#429)
  • file history log (#381)
  • more tag support (#483)
  • file blame (#484)
  • visualize branching structure in log tab (#81)

Inspiration

Comments
  • Per line staging

    Per line staging

    Currently we can stage things only hunk by hunk or whole file at once. It would be nice to have ability to stage only current line or bunch of selected lines.

    Flow would look like something like this: We focus on diff panel and navigate to a hunk we want to work with. Select lines we want to stage with arrows and some modifier key (is tui allow that kind of thing?) and press [S]tage button. If there were no selection stage current line.

    Inspired by git-cola behavior, but it's a gui app.

    enhancement 
    opened by non-descriptive 30
  • fix core-editor ignored (#414)

    fix core-editor ignored (#414)

    https://github.com/extrawurst/gitui/issues/414

    clean branch this time - i think.

    This fixes the following issues

    • core.editor config value ignored
    • config.get_str always fails (add new helper function)
    • external editor fails to launch if it has spaces in it (vscode on windows I'm looking at you)

    Notes

    • I tried real hard to fix the 2 other config.get_str (in commit) but could not. I dont know enough about error conversions. I got it working but then clippy shot me down. I did verify that they always fail. If user.name is set this will still return "unknown".
    • I did not fix the parsing of editor commands args that may have spaces in them (as per comments in the code)
    opened by pm100 27
  • Change diff renamed files

    Change diff renamed files

    This Pull Request closes #1038.

    It changes the following:

    • Add status change on rename
    • Change diff title to represent rename
    • Change diff to show only rewrites on rename

    I followed the checklist:

    • [X] I added and fixed current unittests.
    • [x] I ran make check without errors
    • [X] I tested the overall application
    • [X] I added an appropriate item to the changelog
    opened by Mifom 26
  • Add popup for file history

    Add popup for file history

    This adds a popup for showing the history of a single file. The PR is already in a state that should give you an idea of how the final version could look like.

    There are a few issues that would need to be resolved before this can be considered ready:

    • Gathering the commit history is very slow, compared to running git log -- <path> on the command line. I will investigate and have a look at how git as well as tig do things to get an idea of how to speed things up.
    • I will manually test the new popup to make sure the history matches git log (I already have one minor discrepancy on my list).
    • commands does not return navigation commands for self.list yet.
    • When I had the commit almost prepared, I noticed that the “Log” tab shows commit details on Enter, to the right of the log. Do we want that same behaviour here?

    Looking forward to your feedback!

    opened by cruessler 24
  • pre-commit hooks do not run

    pre-commit hooks do not run

    I have been usuing gitui quite regularly for a few weeks and I am in love with it. The only downside is that pre-commit hooks are not running and sometimes I don't see errors until they hit CI.

    Describe the bug pre-commit hooks do not run.

    To Reproduce Create a commit in a repo with pre-commit hooks installed.

    Try with a sample pre-commit.

    pip instal pre-commit
    pre-commit sample-config > .pre-commit-config.yaml
    pre-commit install
    

    Expected behavior pre-commit hooks run after the message is entered.

    Screenshots If applicable, add screenshots to help explain your problem.

    Context (please complete the following information):

    • wsl/Debian 9
    • docker/stretch
    • GitUI Version: 0.10.1
    bug help wanted windows 
    opened by WaylonWalker 24
  • Branch popup

    Branch popup

    Implements a branch popup which can be accessed by pressing 'b' in the status tab. branch_popup A new branch can be created by pressing 'c' while the branch popup is open and a branch can be checked out by selecting the branch and pressing enter.

    This does currently work but it is still a work in progress.

    Linked to #91.

    opened by WizardOhio24 23
  • v0.22.0 => increased app startup time

    v0.22.0 => increased app startup time

    Hi @extrawurst,

    First, thanks for this great piece of software, it truly is the best of the CLI Git clients!

    Just want to make an observation regarding the 0.22 release: I really appreciate the update with the great new features (yes! (https://github.com/extrawurst/gitui/pull/1371)), but I noticed that there is now a significant delay on startup for relatively small repos (1500 Commits):

    • Launching gitui with an immediate quitting on that 1500 commit repo went from an average of : 0,094 (v0.21) up to 0,746 (v0.22).

    Is that expected? (ie: the price to pay for the new features)

    Thx!

    bug 
    opened by MartinVincent 22
  • Linux builds, please?

    Linux builds, please?

    I currently use lazygit, but have a few gripes with it.

    I understand that this project is in very early stages, but I'd still want to try it.

    Having linux builds like other rust tools would be great, thanks!

    enhancement help wanted 
    opened by dufferzafar 21
  • It should support auto login for push

    It should support auto login for push

    Is your feature request related to a problem? Please describe. When I use git command, I don't have to type the user name and password everytime for push. Because I saved my password by credential helper.

    Describe the solution you'd like If the user is using a credential helper feature, the gitui should not ask a user name and password

    enhancement 
    opened by computerphilosopher 20
  • Add search bar at bottom of revlog

    Add search bar at bottom of revlog

    Closes #429, Closes #449, (part of 1.0 todo list)

    Adds a search bar at the bottom of the log tab which allows for searching commits. It works, but I'm not sure what keys are best for accessing this. Go to log tab then press s (suggested in #449), the search box will pop up and be in focus, type to search, the results will appear in the log where the arrow keys can scroll through them. Press esc to close the search box, then esc again to cancel the search and return to all commits.

    TODO:

    • [x] Async filtering
    • [x] Filter by sha (with :s)
    • [x] Filter by author (with :a)
    • [x] Filter by message (with :m)
    • [x] Filter by tag (with :t)
    • [x] Support for complement (i.e. not) filtering (with :!)
    • [x] Support for union filtering (with ||)
    • [x] Support for intersection filtering (with &&)
    • [x] Support case sensitive filtering (with :c)
    • [x] Support brackets and nested brackets in search
    • [x] Make a wrapper around git_log which supports filtering and have revlog use that instead of git_log, not going to implement because it might not be better right now

    Within the search:

    • :s xxx filters only shas for xxx
    • :a xxx filters only authors for xxx
    • :m xxx filters only messages for xxx
    • :t xxx filters only tags for xxx These can be combined to :sam(any order works, so :asm or :sma works as well) to search for all, which is equivalent to putting nothing at the start

    Complement filtering is possible with :!, which returns anything not containing what was searched for, for example to get all commits whose messages do not contain 'fix' or 'remove':

    • :!m fix &&:!m remove

    Case sensitive filtering is possible with :c, for example, to find messages which contain 'Fix' and do not contain 'fix':

    • :c Fix

    This also adds support for intersection filtering using &&(i.e only if 'x' and 'y'), for example, to find commits where author name contains 'richard' and the commits message has 'fix' in it:

    • :a richard&&:m fix

    And support for union filtering using ||(i.e or), for example to find any commits whose message contains 'fix' or 'move' or any commits which contain aabb':

    • :m fix ||:m move || aabb (notice spaces at start and end are irrelevant, they are trimmed, but : must come before a space if filtering by something).

    Intersection is currently always higher priority than union, for example, to find commit message which contain 'fix' and 'readme' or contain move = :m fix&&:m readme || move which is equivalent to ((:m fix&&:m readme) || move ).

    And so, for a more complex query:

    • :m fix && :m revlog ||:a richard &&:m status ||:s aabb ||:mc Remove || :!cm bigger

    For another example, show the commits which have tags where the commits contain 'pre' or ('fix' and 'CD'):

    • :t &&(:m pre ||(:m fix&&:m CD))

    Some screenshots

    Screenshot_20210213_154144

    Screenshot_20210213_152955

    Screenshot_20210213_153014

    Screenshot_20210213_153851

    opened by WizardOhio24 20
  • Use gitui with remote repositories

    Use gitui with remote repositories

    Is your feature request related to a problem? Please describe. I would like to push and pull from remote branches.

    Describe the solution you'd like Potentially a tab beside Status and Log called Remote, the functions would be pull, push, fetch, and anything to do with remote branches.

    The functionality to push a local branch of some name to a remote branch of some other name like git push origin localdev:feature_remote should be included. I'm not a git poweruser, so I don't require much from remotes, I'm sure other people would have better ideas.

    Describe alternatives you've considered Ctrl+C to quit gitui, git push, gitui

    enhancement 
    opened by alistaircarscadden 20
  • sort and search in branch list

    sort and search in branch list

    Is your feature request related to a problem? Please describe. In our code repo, we have a lot of branches. I only care about some branches: the main, branches with my name, and recent updated branches.

    In the current branch window, it is sorted by the branch name. This makes me very hard to find the main, I need to a few page down (and maybe a few page up) to find it.

    Describe the solution you'd like

    1. Sort the branch list not only by branch name. We can add another button to sort it with the most recent commit time.
    2. in the branches windows, add a / function to filter the branch name. It could be simple text match or a regular expression.

    Describe alternatives you've considered

    For finding the recent branches, the graph view can help a lot. I noticed that there is already an issue for it: https://github.com/extrawurst/gitui/issues/81

    And for finding a branch, in our practice, we use a folder-like branch name convention: a/b/c. If the branch window can show it as a tree view, it will also help.

    Additional context n/a

    feature-request 
    opened by srayuws 0
  • Change editor

    Change editor

    I want to cheange the text editor.

    A option to change the editor, on one hand it could be a conf in .config/gitui/config.toml or add a (hidden) settings tab to modify what it is neccesary for the user.

    What is your opinion about this? Do i miss something?

    feature-request 
    opened by Talleyrand-34 1
  • vim like keybindings not working on mac

    vim like keybindings not working on mac

    following https://github.com/extrawurst/gitui/blob/master/KEY_CONFIG.md

    i would expect hjkl keys to work. Instead 'h' always brings up help menu and no motion with the other keys.

    running with '-l' flag and i don't see a log about reading the key config file. makes sense as I threw in an

    edit_file: Some(( code: Char('I'), modifiers: ( bits: 1,),)),
    

    and 'e' is what triggers the edit action, not (shift i) 'I'.

    these are the files in the config dir

    /Users/jacobono/.config/gitui

    • key_bindings.ron
    • key_config.ron
    • theme.ron

    am i doing something silly (?) bc the instructions are fairly straightforward and i've double checked a couple of times.

    mac: 12.6 monterrey alacritty 0.10.1 (2844606) gitui 0.22.1

    bug 
    opened by jacobono 3
  • Gitui takes a long time to start under Windows Linux Subsystem

    Gitui takes a long time to start under Windows Linux Subsystem

    Describe the bug Under WLS you need to (unexpectingly?) use the Window's gitui.exe. It eventually comes up, but takes 20+ seconds to do so.

    To Reproduce

    1. Start a WSL shell
    2. Run 'gitui'

    Expected behavior 'Lightning fast' startup ;-)

    Context

    • Windows 11, Ubuntu 20_02.2 LTS
    • GitUI 0.22.1

    Additional context Not sure if gitui is intended to be used in this setting, but alas.

    bug help wanted windows 
    opened by tbee 3
  • [WIP] Status fetch

    [WIP] Status fetch

    This Pull Request fixes/closes #1471.

    It changes the following:

    • adds the Fetch command to the status window

    I followed the checklist:

    • [ ] I added unittests
    • [x] I ran make check without errors
    • [x] I tested the overall application
    • [ ] I added an appropriate item to the changelog

    Comments

    This is a WIP. Looking for feedback. Adding the Fetch command to the window was easy. Now, the Fetch popup has been designed to fetch all. This is what the current version is doing, hence the warning for unused branch string. It is possible:

    • remove the branch string and keep fetch_all as the command
    • implement the branch fetching in fetch_popup

    What would you suggest?

    opened by alensiljak 2
  • CI Feature: Implement pull request preview environments

    CI Feature: Implement pull request preview environments

    Is your feature request related to a problem? Please describe. GitUI does not have full stack previews on their PRs, so I would like to support GitUI by implementing Uffizzi preview environments. Disclaimer: I work on Uffizzi.

    Describe the solution you'd like Uffizzi is a Open Source full stack previews engine and our platform is available completely free for GitUI (and all open source projects). This will provide maintainers with preview environments of every PR in the cloud, which enables faster iterations and reduces time to merge. You can see the open source repos which are currently using Uffizzi over here

    Uffizzi is purpose-built for the task of previewing PRs and it integrates with your workflow to deploy preview environments in the background without any manual steps for maintainers or contributors. We can go ahead and create an Initial PoC for you right away if you think there is value in this proposal.

    • [ ] Initial PoC

    Describe alternatives you've considered

    Additional context

    feature-request 
    opened by waveywaves 2
Releases(v0.22.1)
Owner
Stephan Dilly
Founder and Dev at gameroasters.com and stack4.io
Stephan Dilly
Terminal bandwidth utilization tool

bandwhich This is a CLI utility for displaying current network utilization by process, connection and remote IP/hostname How does it work? bandwhich s

Aram Drevekenin 7.5k Dec 31, 2022
Terminal disk space navigator 🔭

diskonaut How does it work? Given a path on your hard-drive (which could also be the root path, eg. /). diskonaut scans it and indexes its metadata to

Aram Drevekenin 1.6k Dec 30, 2022
A fast duplicate file finder

The Directory Differential hTool DDH traverses input directories and their subdirectories. It also hashes files as needed and reports findings. The H

Jon Moroney 384 Dec 24, 2022
A simple, fast and user-friendly alternative to 'find'

fd [中文] [한국어] fd is a program to find entries in your filesytem. It is a simple, fast and user-friendly alternative to find. While it does not aim to

David Peter 25.8k Dec 30, 2022
Super-fast command aliases with arguments.

Bonnie Bonnie is a command aliasing tool. If you have a super-long command that you have to run all the time, Bonnie is for you! Just define the comma

arctic_hen7 58 Dec 22, 2022
A fast and minimalistic image viewer forked from the now discontinued emulsion.

Alloy Image viewer based on (now-discontinued) Emulsion. Alloy targets Windows, Mac, and Linux (with more targets to come!). A note for Linux users: W

Ardaku Systems 9 Dec 1, 2022
A modern replacement for ps written in Rust

procs procs is a replacement for ps written in Rust. Documentation quick links Features Platform Installation Usage Configuration Features Output by t

null 3.6k Jan 5, 2023
A bash-like Unix shell written in Rust

Cicada Unix Shell Cicada is a simple Unix shell written in Rust. Documents Install cicada Environment Variables Cicada Builtins Completion RC File His

Hugo Wang 921 Dec 28, 2022
Performs distributed command execution, written in Rust w/ Tokio

Concurr: Distributed and Concurrent Command Execution, in Rust This project is dual licensed under MIT and Apache 2.0. Originally inspired by the GNU

Michael Murphy 93 Dec 18, 2022
A TUI system monitor written in Rust

NO LONGER MAINTAINED. For a similar program, check out https://github.com/ClementTsang/bottom. ytop Another TUI based system monitor, this time in Rus

Caleb Bassi 2.1k Jan 3, 2023
A non-root version of traceroute written in Rust

tracepath-rs A non-root version of traceroute written in Rust for Linux.

Peter Malmgren 9 Dec 30, 2022
Dancing Links (“dlx”) solver for the exact cover problem, written in Rust. Can be used to create a sudoku solver.

Dancing Links “dlx” Dancing Links solver for “algorithm X” by Knuth This solver solves the exact cover problem using “algorithm X”, implemented using

bluss 4 Nov 19, 2022
A system handler to get information and interact with processes written in Rust

A system handler to get information and interact with processes written in Rust

Guillaume Gomez 1.1k Jan 3, 2023
LeftHK - A hotkey daemon written in Rust

LeftHK LeftHK - A hotkey daemon written in Rust THIS IS BETA SOFTWARE The configuration file should be created in ~/.config/lefthk/ and called config.

null 15 Oct 12, 2022
minimalistic command launcher in rust

rrun Note: Apart from the occasional fix, this project is not actively developed anymore. rrun works fine and should run/compile for the time being on

null 105 Nov 18, 2022
Yet another fancy watcher. (Rust)

funzzy Yet another fancy watcher. (Inspired by antr / entr) Configure execution of different commands using semantic yaml. # .watch.yaml # list here a

Cristian Oliveira 188 Dec 12, 2022
A more intuitive version of du in rust

Dust du + rust = dust. Like du but more intuitive. Why Because I want an easy way to see where my disk is being used. Demo Install Cargo cargo install

andy.boot 5.5k Jan 8, 2023
Fuzzy Finder in rust!

Life is short, skim! Half of our life is spent on navigation: files, lines, commands… You need skim! It is a general fuzzy finder that saves you time.

Jinzhou Zhang 3.7k Jan 4, 2023
A library to listen to global hotkeys in Rust

Rust Hotkey A library to listen to global hotkeys in Rust How to use See the examples folder for how to use this library. OS Support This lib aims to

James Birtles 44 Dec 12, 2022