onefetch: an offline Rust tool that summarizes a local Git repository in the terminal, with language and author quirks to know first
Command-line Git information tool
At a glance
- What is it?
- onefetch prints project information and code statistics for a local Git repository, entirely offline. It installs in one line on most platforms, but its default language filter, its author list and its fast release pace each change what you see and how far you can script against it.
- Who is it for?
- onefetch is a good fit for developers who want a quick, offline snapshot of a local repository's languages, authors and statistics, and for anyone who wants that snapshot as JSON or YAML. It is not a tool for remote repositories, and its default view under-reports documentation and configuration repositories until you widen --type.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- o2sh/onefetch12,088 ★ · +38
| Repository | 2026-09-22 | 2026-11-14 |
|---|---|---|
| o2sh/onefetch | 12.1k | 12.1k |
38 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
It reads a local repository and nothing else
onefetch is a command-line Git information tool written in Rust. It displays project information and code statistics for a local Git repository directly in the terminal, and it works completely offline. There are two ways to point it at a repository. Pass the path:
onefetch /path/of/your/repoOr change into the repository and run it with no arguments:
cd /path/of/your/repo
onefetchThe offline design has a clear consequence: onefetch is not a way to inspect a repository you have not cloned. Everything it shows comes from the working copy and the Git history on disk, read through the gix library, so a shallow or partial clone gives it less history to work with. If you want a summary of someone else's project, clone it first and then run onefetch against the clone.
Prose and data languages stay hidden until you pass --type
The most common surprise is a language missing from the output. By default onefetch shows only languages classified as programming and markup. Anything classified as prose, such as Org mode, Markdown or plain text, or as data, such as JSON, YAML or TOML, is left out. For a documentation site, a configuration repository or a dataset, the default view can therefore look nearly empty or show a single minor language as dominant. The fix is to name the categories you want:
onefetch --type programming markup prose dataThe classification itself lives in languages.yaml at the top of the repository, and onefetch currently supports more than 100 programming languages. If a language you use is not recognized at all, the project's answer is to open an issue so support can be added, rather than a local override.
Duplicate authors come straight from Git history, and .mailmap is the only fix
onefetch builds its author list from the Git history. If the same person committed under different names or email addresses, for example a work and a personal address, they appear as separate authors, and the contribution split between them is wrong. onefetch does not guess which identities belong together. The supported fix is a .mailmap file in the repository, the standard Git mechanism for mapping alternate names and emails to one canonical identity; onefetch enables the mailmap feature of gix to honor it. The onefetch repository carries its own .mailmap at the top level. For a team repository this is worth doing once and committing, because it also corrects other Git tools that read the same file, not only onefetch.
The Ubuntu one-liner fetches the latest amd64 package only
On Ubuntu the install is a single chained command:
wget https://github.com/o2sh/onefetch/releases/latest/download/onefetch_amd64.deb && sudo dpkg -i ./onefetch_amd64.deb && rm onefetch_amd64.debIt downloads whatever the latest release is, installs it with dpkg and deletes the file. Two limits follow. The asset name is onefetch_amd64.deb, and the Makefile's release-deb target produces only that file, so ARM Ubuntu machines need another route. And because the link follows latest, two machines installed weeks apart can run different versions. The package puts the binary in /usr/bin and the onefetch.1 man page in /usr/share/man/man1. Other platforms use their package managers:
pacman -S onefetchzypper install onefetchbrew install onefetchwinget install onefetchPrebuilt binaries for Linux, Windows and macOS are also on the GitHub release page, and the crate is published on crates.io.
Building from source needs Rust 1.88 and the 2024 edition
Cargo.toml sets rust-version to 1.88.0 and edition to 2024, so an older distribution toolchain will refuse to build it. The Makefile wraps the usual cargo commands, all with --locked so the versions in Cargo.lock are used exactly. make install runs:
cargo install --path . --lockedmake build runs:
cargo build --release --lockedand make uninstall runs cargo uninstall onefetch. The release targets show how the published artifacts are made: release-mac, release-linux and release-win tar up the release binary, release-win also runs iscc.exe against .github/workflows/windows-installer.iss with the latest Git tag as the version, and release-deb calls cargo deb with --no-build. The crate excludes /site and the PNG files under assets from the published package, so the website source in site/ is not part of a crates.io install.
JSON and YAML output turn it from a banner into a data source
onefetch is customized through command-line arguments, documented on the project wiki under command-line options. They cover text styling, disabling individual info lines, ignoring files and directories, and output in multiple formats, specifically JSON and YAML, backed by the serde_json and serde_yaml crates. That last option matters most for anyone who wants to use onefetch in automation, for example to record language breakdowns across many repositories. The terminal view is meant for people; the JSON or YAML output is the one to parse. The full flag list is on the wiki rather than on the README page itself, so check the wiki for the exact flag names before writing a script, and pin the onefetch version that script was written against.
A major version and two minor releases in under four weeks
The project is under active development. Release 3.0.0 shipped on 6 October 2026, 3.1.0 on 18 October 2026 and 3.2.0 on 31 October 2026, and the last push to main was on 2 November 2026. Cargo.toml is at version 3.2.0. A major version bump means behavior or output may have changed in ways older scripts do not expect, and CHANGELOG.md at the top of the repository is where those changes are recorded. For interactive use this pace is mostly good news. For anything that parses onefetch output, it is a reason to install a specific release rather than the latest link, and to read the changelog before upgrading. The repository also includes a snap/ directory and a benches/ directory alongside src/ and tests/, and the project is licensed under MIT.
Editorial conclusion
onefetch is a good fit for developers who want a quick, offline snapshot of a local repository's languages, authors and statistics, and for anyone who wants that snapshot as JSON or YAML. It is not a tool for remote repositories, and its default view under-reports documentation and configuration repositories until you widen --type. Before relying on it in scripts, pin a version, since 3.0.0, 3.1.0 and 3.2.0 landed within four weeks, and add a .mailmap if your history has authors under several names or emails.
Frequently asked questions
How to use onefetch?
Run onefetch /path/of/your/repo, or cd into the repository and run onefetch with no arguments. It reads the local Git repository and prints project information and code statistics offline.
Why doesn't onefetch show Markdown or JSON in the language list?
By default onefetch shows only programming and markup languages. Add prose and data languages with onefetch --type programming markup prose data.
Can onefetch output JSON?
Yes. Its command-line arguments support output in JSON and YAML, alongside options for text styling, disabling info lines and ignoring files and directories.
How do I install onefetch on macOS or Windows?
On macOS run brew install onefetch, and on Windows run winget install onefetch. Prebuilt binaries for both are also on the GitHub release page.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/o2sh-onefetch)Star history chart for your README
[](https://hysenlabs.com/projects/o2sh-onefetch)Was this useful?