gfld

Crates.iogfld
lib.rsgfld
version1.0.4
sourcesrc
created_at2021-03-30 01:59:23.023643
updated_at2021-04-05 02:01:13.516173
descriptionThe minimal version of gfold, a CLI tool to help keep track of your Git repositories.
homepagehttps://nickgerace.dev
repositoryhttps://github.com/nickgerace/gfold/
max_upload_size
id375435
size13,409
Nick Gerace (nickgerace)

documentation

README

gfold

GitHub Latest SemVer GitHub Tag Crates.io Build Status

gfold is a CLI-driven application that helps you keep track of multiple Git repositories.

user at hostname in ~/git
% gfold
great-journey      unclean   main      git@github.com:truth/great-journey.git
installation-zero  bare      main      https://github.com/the-ark/installation-zero.git
sierra             unpushed  dev       https://github.com/forward-unto-dawn/sierra.git
spark              clean     issue343  git@github.com:guilty/spark.git
tartarus           unclean   delta     git@github.com:covenant/tartarus.git
voi                clean     main      https://github.com/earth/voi.git

Description and Motivation

This app displays relevant information for multiple Git repositories in one, or multiple, directories. While this tool might seem limited in scope and purpose, that is by design.

It prints each repository in alphabetical order, and pads each result based on the longest directory, branch, and status string. By default, gfold looks at every Git repository in the current working directory. However, if you would like to target another directory, you can pass that path (relative or absolute) as the first argument.

Should I use gfold or gfld?

Crates.io

gfld is the new, minimal version of gfold. It contains only one configurable option (an optional, single command-line argument for the target path) and is much smaller than the original application in size.

It is intended for fans of the original application who want a near-configurationaless usability and a smaller footprint on their systems. It does not promise faster runtime performance, but it delivers on the two former goals.

There are two major behavioral differences from the original application: only recursive search is available (similar to gfold -r), and all results are combined into one table (inspired by kubectl get pods -A).

Installation

This repository contains two applications: gfold, the primary, fully-featured version, and gfld, the minimal version. There is only one recommended method for installing the latter, and the original version has multiple methods for installation. Thus, this section starts with the minimal version.

For all installation steps: it is highly recommended to run strip against the binary on compatible systems to reduce executable size. The following script was tested on macOS and Linux systems:

for i in $(command -v gfold) $(command -v gfld); do
    [ "$i" != "" ] && strip $i && du -h $i
done

The above script will work with either application installed, both installed, or neither installed.

If you do not know where either application was installed, you can use the which command on compatible platforms or check your cargo install settings.

Installing gfld

Currently, the only recommended method to install gfld is by using cargo to install the crate. Fortunately, the minimal application should work on nearly every major platform.

cargo install gfld

Keeping the crate up to date is easy with cargo-update.

cargo install cargo-update
cargo install-update -a

Installing gfold

You can use macOS Homebrew or Linuxbrew to install the tap.

brew install nickgerace/gfold/gfold

You can use a Linux distribution that supports installing packages from the AUR to install: gfold (builds from source) and/or gfold-git (VCS/development package). Many people choose to use an AUR helper, such as yay or paru, in order to install their AUR packages.

yay -S gfold
paru -S gfold

You can use cargo to install the crate on almost any platform. Consult the gfld section above on how to keep the crate up to date with cargo-update.

cargo install gfold

Usage

For gfold: pass in the -h, or --help, flag to see all the options for using this application.

gfold
gfold ..
gfold $HOME
gfold /this/is/an/absolute/path
gfold ../../this/is/a/relative/path
gfold ~/path/to/multiple/repositories/ -r
gfold -r $HOME/path/to/multiple/repositories

For gfld: you can pass in the -h, or --help too. However, there is only one method of configuration: an optional, single command-line argument for the target path. This is a result of the minimal application's design.

gfld
gfld ..
gfld $HOME
gfld /this/is/an/absolute/path
gfld ../../this/is/a/relative/path

Compatibility

Both applications are intended to be ran on any tier one Rust target. Please file an issue if your platform is unsupported.

Other Documentation

Code of Conduct

This repository follows and enforces the Rust programming language's Code of Conduct.

Additional Information

Special Thanks To...

Commit count: 260

cargo fmt