LinuxCommandLibrary

onefetch

command-line Git information tool that displays repository summary with ASCII

TLDR

Show repository info

$ onefetch
copy
Show info for specific repository
$ onefetch [/path/to/repo]
copy
Show info in ASCII art
$ onefetch --ascii-language [python]
copy
Disable ASCII art
$ onefetch --no-art
copy
Show specific info only
$ onefetch --show-info [project,head,version,size]
copy
Hide specific info
$ onefetch --hide-info [authors,commits]
copy
Output as JSON
$ onefetch --output json
copy
Use custom image
$ onefetch --image [/path/to/image.png]
copy

SYNOPSIS

onefetch [path] [--ascii-language lang] [--image file] [--output format] [options]

DESCRIPTION

onefetch is a command-line Git information tool that displays repository summary with ASCII art representing the dominant programming language. It's designed for quick repository overview, similar to neofetch for system info.
The display includes: project name, description, HEAD reference, version tags, creation date, languages breakdown, authors, last change, repository size, lines of code, license, and dependencies.
ASCII art is automatically selected based on the dominant language. Over 100 language logos are included. Custom images can be displayed in supported terminals (kitty, iTerm2, terminals with Sixel support).
Author statistics show commit counts and line contributions. Bot accounts can be filtered out. Language detection respects .gitignore and can exclude additional patterns.
Output formats (JSON, YAML) enable integration with other tools. Field selection allows customizing what information appears, useful for different use cases or terminal sizes.

PARAMETERS

-a, --ascii-language LANG

Force ASCII art for specified language.
-i, --image FILE
Use custom image instead of ASCII.
--image-protocol PROTOCOL
Image protocol: sixel, kitty, iterm.
--no-art
Disable ASCII/image art.
-o, --output FORMAT
Output format: yaml, json.
--show-info FIELDS
Show only specified info fields.
--hide-info FIELDS
Hide specified info fields.
--no-bold
Disable bold text.
--no-color-palette
Hide color palette.
--number-of-authors NUM
Number of authors to display.
--number-of-languages NUM
Number of languages to display.
-e, --exclude PATTERNS
Ignore files matching patterns.
--no-bots
Exclude bot commits from statistics.
-T, --true-color WHEN
True color: auto, always, never.
-d, --disabled-fields FIELDS
Deprecated alias for --hide-info.

CAVEATS

Requires a Git repository. ASCII art needs sufficient terminal width. Image display requires compatible terminal. Large repositories may take time to analyze. Some statistics require full repository history. Language detection may misidentify some file types.

HISTORY

onefetch was created by Ossama Hjaji (o2sh) starting around 2019, inspired by neofetch and screenfetch. Written in Rust, it gained popularity for providing a visually appealing way to showcase repository information. The project has grown to support many languages and terminals.

SEE ALSO

neofetch(1), tokei(1), git(1), cloc(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community