repofetch

Fetch details about your remote repository.

Usage

Description

repofetch is a CLI tool to fetch stats (think neofetch or onefetch) that uses plugins for its implementation. The original version was focused on repository stats, and any official plugin will be for repositories, hence the “repo” in repofetch. With 3rd-party plugins, however, it can support other types of outputs, too. This tool may be renamed in the future.

Follow this discussion for details about the potential rename.

Installation

Via RubyGems.org

gem install repofetch

Via AUR

If you are using an Arch machine, you can install repofetch from the Aur.

Stable

yay -S ruby-repofetch-bin

Development

yay -S ruby-repofetch

Via NetBSD

pkgin install ruby-repofetch

Installing Version < 0.4.0

Via Crates.io

cargo install repofetch

Via NetBSD

Pre-compiled binaries are available from the official repositories To install this, simply run:

pkgin install repofetch

Or, if you prefer to build it from source:

cd /usr/pkgsrc/sysutils/repofetch
make install

You need to have rust and libgit2 installed in order to build the package.

Configuration

A file called .repofetch.yml in your home directory will configure repofetch. The first time you run repofetch, the default configuration will be written to this file.

Files called .repofetch.env and repofetch.env in your home directory will set environment variables for repofetch, via the dotenv gem. These environment variables can be useful for plugins that require secrets. The purpose of these files is to separate secrets from configuration, so that, for example, you could add .repofetch.yml to a dotfiles repository without compromising an API token.

You can find the absolute paths to these files with the --help option.

Examples

# .repofetch.yml
plugins:
  - 'repofetch/github'
# .repofetch.env
GITHUB_TOKEN=my-token-abcdefg

# Yes, command substitution is supported!
GITHUB_TOKEN=$(gh auth token)

Notes on Rust Implementation (Version < 0.4.0)

I switched from Rust to Ruby to rewrite this project to use and support plugins. I won't develop new features for the Rust implementation, but I may fix bugs, and I'll review pull requests. The Rust implementation is on the rust branch.