In the command-line ecosystem, system information fetchers such as Neofetch and Fastfetch are widely used to display hardware, OS, and kernel statistics alongside vibrant ASCII art. For software developers and Linux administrators, onefetch brings this exact aesthetic and analytical utility to Git version control. Written in Rust for maximum speed, onefetch scans any local Git repository and instantly renders an overview showing dominant programming languages, commit counts, author distributions, project licensing, and repository age directly inside your terminal.
Key Metrics Reported by onefetch
When executed inside the root of a Git directory, onefetch generates an ASCII logo corresponding to the project’s primary language along with a formatted metadata card:
- Project & Version: Displays repository name, HEAD branch, and current tag or commit hash.
- Language Breakdown: Calculates precise percentages and file distributions across all languages detected in the codebase.
- Authors & Contributors: Summarises total contributor count alongside percentage contribution of top committers.
- Repository Timeline: Shows creation date, date of last commit, and total number of commits.
- File Size & Line Counts: Tallies total repository footprint and lines of code (LOC).
- Licence & Remote URLs: Detects SPDX licence identifiers and lists origin remote endpoints.
Installing onefetch on Linux Distributions
onefetch is packaged across several official Linux software repositories and can also be installed via Cargo (the Rust package manager) or official standalone pre-compiled binaries.
| Distribution / Platform | Package Manager / Method | Command |
|---|---|---|
| Ubuntu / Debian | Snap or Pre-compiled DEB | sudo snap install onefetch |
| Arch Linux / Manjaro | Pacman (Extra repository) | sudo pacman -S onefetch |
| Fedora | DNF | sudo dnf install onefetch |
| Rust / Cargo (Universal) | Cargo Crates.io | cargo install onefetch |
For Debian or Ubuntu users preferring standard APT packages, download the latest .deb asset directly from the official GitHub releases page:
wget https://github.com/o2sh/onefetch/releases/latest/download/onefetch-linux-amd64.tar.gz
tar -xzf onefetch-linux-amd64.tar.gz
sudo mv onefetch /usr/local/bin/
Running onefetch in a Git Repository
Using onefetch requires no mandatory configuration. Simply navigate into any Git-tracked project directory and execute the command:
cd ~/projects/my-web-app
onefetch
To inspect a repository located in another directory path without changing your active shell location, pass the path directly as an argument:
onefetch /var/www/production-backend
Useful Command-Line Flags and Customisations
onefetch provides versatile options to tailor the output density and visual style to your shell workflow:
| Flag / Option | Description | Example Usage |
|---|---|---|
--languages / -l |
Displays only the language composition breakdown without author or commit statistics. | onefetch -l |
--no-merges |
Excludes merge commits from the total commit calculations and committer rankings. | onefetch --no-merges |
--number-of-authors |
Limits the number of individual author names shown in the contribution list. | onefetch --number-of-authors 3 |
--image |
Replaces text ASCII art with a custom PNG/SVG image using Kitty, Sixel, or iTerm protocols. | onefetch --image logo.png |
--exclude / -e |
Ignores specific files or folders (e.g. vendor dependencies, build artifacts) from language analysis. | onefetch -e "node_modules" |
Adding onefetch to Your Directory Navigation Workflow
Developers who frequently inspect cloned open-source repositories often create a shell function or alias in their ~/.bashrc or ~/.zshrc file that automatically prints a onefetch card whenever entering a directory containing a .git folder:
# Auto-run onefetch when entering a git repository in Bash/Zsh
cd() {
builtin cd "$@" || return
if [ -d .git ] && command -v onefetch >/dev/null 2>&1; then
onefetch
fi
}