Project

repofetch

0.01
No release in over a year
A plugin-based tool to fetch stats, with a GitHub stat fetcher included by default
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 1.1
~> 0.59
~> 13.0
~> 3.11
~> 1.36
~> 0.21
~> 0.9.28

Runtime

~> 7.0, >= 7.0.4
~> 2.8
~> 1.12
~> 6.0, >= 6.0.1
>= 0
 Project Readme

repofetch

Gem Version GitHub contributors (via allcontributors.org) CI CodeQL codecov

Fetch details about your remote repository.

Usage

basic demo

advanced plugin 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

Packaging status

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

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.