Onefetch - Generate a fetch from your Git repository

  2 mins read  

Get information from your Git repository via the command line.

Onefetch is a command line information tool that displays information about your Git repository directly on your terminal.

Onefetch provides the user with code statistics and design information with features such as license detection. Onefetch will show you:

  • The programming language, as well as the project members;
  • LOC (lines of code);
  • Disk size;
  • Contributors
  • Version;
  • etc.

You can further configure Onefetch to display exactly what you want. Through the use of parameters via the command line.

Onefetch supports more than 50 different programming languages.


Installation

Onefetch is written in Rust. But several operating systems already have in their repositories, they are:

brew update && brew install onefetch # macOS
sudo nix-env -i onefetch # NixOS
sudo zypper install onefetch # OpenSUSE

For any Linux distro just install Rust via your package package manager and add the precompiled binary to your $PATH variable, example for /usr/local/bin with the most current version according to the date of publication of this article :

wget https://github.com/o2sh/onefetch/releases/download/v2.4.0/onefetch-linux.tar.gz
tar zxvf onefetch-linux.tar.gz
cd onefetch-linux/
sudo mv onefetch /usr/local/bin/

Para Windows há um executável também disponível em releases e para outros sistemas, você pode construir o binário a partir do código fonte.

Use

Once installed, just enter a git repository and run the onefetch command, example for the Wallset repository

git clone  https://github.com/terroo/wallset
cd wallset
onefetch

Wallset onefetch

The repo information is displayed next to the ASCII logo for the dominant language. You can also configure Onefetch to use an image (png, jpeg …) in the supported terminals with the -i parameter and indicating the image address, example:

Remembering that only terminal emulators: xterm, mlterm and kitty are supported

onefetch -i path/to/image.jpg

Image Onefetch

For more information, consult the project repository.

Thanks for reading!

Add our feed: https://en.terminalroot.com.br/feed to:

Feedly