Skip to content

andrsem/gitty

Repository files navigation

gitty logo gitty screenshot

Customizable status line tool for multiple Git repos

Inspired by mgitstatus

Feature Highlights

  • Manage the list of Git repos. (see List Subcommand)
  • Show the status of managed Git repos. (see Status Subcommand)
  • Execute aliases or shell commands on managed repos. (see Run Subcommand)
    • Choose status filters to decide when to execute aliases or shell commands.
    • Create aliases for frequently used commands. (see Aliases Configuration)
  • Filter repos by tags or by path pattern.
  • Create new layouts. Choose and style status components, or create custom ones. (see Layout Configuration)
Getting Started with gitty

Quick Start

# Find and add Git repos to the list starting at home directory
gitty list --scan-add ~

# Show the status of all managed repos
gitty

# Show help
gitty --help

Documentation

  • gitty cli documentation can be found at gitty(1) or by using man gitty
  • gitty configuration documentation can be found at gitty-config(5) or by using man gitty-config

Installation

Gitty depends on Swift 6.2 or later. The information about how to install Swift can be found at https://www.swift.org/install

Building from Source

  1. Clone and build

    git clone https://github.com/andrsem/gitty.git ~/Downloads/gitty
    cd ~/Downloads/gitty
    swift build -c release
  2. Install

    sudo install .build/release/gitty /usr/local/bin/
  3. Verify the installation

    gitty --version

Man Pages

Installing Man Pages
  1. Clone

    git clone https://github.com/andrsem/gitty.git ~/Downloads/gitty
    cd ~/Downloads/gitty
  2. Install

    Install in default location: /usr/local/share/man

    MANPATH=/usr/local/share/man
    sudo mkdir -p $MANPATH/man1 $MANPATH/man5
    sudo install docs/man/gitty.1 $MANPATH/man1/
    sudo install docs/man/gitty-config.5 $MANPATH/man5/

Completions

Installing Zsh Completions

If you have oh-my-zsh installed, you already have a directory of automatically loading completion scripts — .oh-my-zsh/completions. Copy your new completion script to that directory.

gitty --generate-completion-script zsh > ~/.oh-my-zsh/completions/_gitty

Your completion script must have the following filename format: _gitty

Without oh-my-zsh, you'll need to add a path for completion scripts to your function path and turn on completion script autoloading. First, add these lines to ~/.zshrc:

fpath=(~/.zsh/completion $fpath)
autoload -U compinit
compinit

Next, create a directory at ~/.zsh/completion and copy the completion script to the new directory.

Installing Bash Completions

If you have bash-completion installed, you can just copy your new completion script to the /usr/local/etc/bash_completion.d directory.

gitty --generate-completion-script bash > /usr/local/etc/bash_completion.d/gitty.bash

Without bash-completion, you'll need to source the completion script directly. Copy it to a directory such as ~/.bash_completions/, and then add the following line to ~/.bash_profile or ~/.bashrc:

source ~/.bash_completions/gitty.bash
Installing Fish Completions

Copy the completion script to any path listed in the environment variable $fish_completion_path. For example, a typical location is ~/.config/fish/completions/gitty.fish.

gitty --generate-completion-script fish > ~/.config/fish/completions/gitty.fish

Future Directions

As of version 1.0, I'm considering the gitty project finished. The main focus after 1.0 would be fixing oversights on my part.

The long-term vision is to keep gitty simple, focused, and working like a dream. Reimplementing Git or implementing every Git feature is not a goal of this project. For advanced usages, consider using Git directly or something like amazing lazygit.

About

Customizable status line tool for multiple Git repos

Resources

License

Stars

Watchers

Forks

Contributors