默认只显示 programming 和 markup 类语言,prose 与 data 类需用 --type 显式包含;同一作者用不同名字或邮箱提交会重复出现,需在仓库加 .mailmap 合并;各平台安装方式不同,Linux 需按发行版选 deb、pacman 或 zypper
brew install onefetch
onefetch /path/of/your/repoREADME 未说明,仅说明支持 Linux、macOS、Windows 平台
在终端离线展示本地 Git 仓库的项目信息与代码统计,注重性能与可定制
用 Rust 写的命令行工具,直接在终端里展示 Git 仓库的统计信息,包括语言构成、贡献者、代码行数等,不用打开网页就能快速了解项目概况。
核心能力
- 离线读取本地仓库并统计代码行数与语言占比
- 支持 100 多种编程语言识别
- 用命令行参数调整文本样式、隐藏信息行、忽略文件目录
- 支持 JSON、YAML 等多种格式输出
- 通过 .mailmap 合并重复作者条目
容易踩的坑
- 3.2.0最新正式版2026-10-31 · 2026-10-31 12:55 UTC
What's Changed
New Features
- Add an Activity field with a commits-per-month sparkline by @o2sh in https://github.com/o2sh/onefetch/pull/1902
- Add
--activity-monthsCLI argument to set the activity window by @o2sh in https://github.com/o2sh/onefetch/pull/1905 - Add an Unreleased field with the commits since the last release by @o2sh in https://github.com/o2sh/onefetch/pull/1903
Full Changelog: https://github.com/o2sh/onefetch/compare/3.1.0...3.2.0
- 3.1.02026-10-18 · 2026-10-18 20:35 UTC
查看更新说明
What's Changed
Bug Fixes
- Fix a crash when
--ascii-inputis empty or only whitespace by @o2sh in https://github.com/o2sh/onefetch/pull/1898 - Fix
--languagesand--ascii-languagelisting languages in random order, a regression since 2.28.0 by @o2sh in https://github.com/o2sh/onefetch/pull/1890 --number-of-languagesnow also applies to-o jsonand-o yamlby @o2sh in https://github.com/o2sh/onefetch/pull/1884
CI/CD
onefetch-ascii,onefetch-imageandonefetch-manifestare merged intoonefetchand no longer published (last version: 3.0.0) by @o2sh in https://github.com/o2sh/onefetch/pull/1884- Release binaries are built with LTO and stripped on all platforms by @o2sh in https://github.com/o2sh/onefetch/pull/1891
Chores
- Replace unmaintained
winreswithwinresourceby @o2sh in https://github.com/o2sh/onefetch/pull/1896
Full Changelog: https://github.com/o2sh/onefetch/compare/3.0.0...3.1.0
- Fix a crash when
- 3.0.02026-10-06 · 2026-10-06 21:12 UTC
查看更新说明
What's Changed
Breaking Changes
JSON/YAML output (
-o json,-o yaml) now contains raw values instead of display text:creationDateandlastChangeare always ISO 8601 timestamps ("2018-09-14T18:51:00Z"). Previously they were relative text ("8 years ago") unless--iso-timewas passed.repoSizeis a number of bytes (2161012) instead of formatted text ("2.06 MiB").dependenciesis replaced bynumberOfDependencies(number) andmanifestType("Cargo","Npm","PyProject", ornullwhen there is no manifest).
onefetch-manifestcrate:ManifestTypehas a newPyProjectvariant.Security Fix
- Fix terminal escape sequence injection through repository data (CVE-2026-100866) By @carfeii in https://github.com/o2sh/onefetch/pull/1829
New Features
- Add pyproject.toml manifest support (PEP 621) by @ChrisJr404 in https://github.com/o2sh/onefetch/pull/1842
- Update Elixir colors to the official brand color by @georgeguimaraes in https://github.com/o2sh/onefetch/pull/1868
Bug Fixes
- Use the default remote for the repository URL by @o2sh in https://github.com/o2sh/onefetch/pull/1873
- Exit with clear error message when repository uses reftable by @Jorge-Polanco-Roque in https://github.com/o2sh/onefetch/pull/1853
Chores
- Separate repository info building from styling by @o2sh in https://github.com/o2sh/onefetch/pull/1880
CI / CD
- Remove manual homebrew release in favor brew bot auto bump by @o2sh in https://github.com/o2sh/onefetch/commit/81c49b8b1a5cdc52ed0bd14cf6d59a01c4a326fe
New Contributors
- @Jorge-Polanco-Roque made their first contribution in https://github.com/o2sh/onefetch/pull/1853
- @georgeguimaraes made their first contribution in https://github.com/o2sh/onefetch/pull/1868
- @ChrisJr404 made their first contribution in https://github.com/o2sh/onefetch/pull/1842
- @carfeii made their first contribution in https://github.com/o2sh/onefetch/pull/1829
Full Changelog: https://github.com/o2sh/onefetch/compare/2.28.1...3.0.0
- 2.28.12026-08-30 · 2026-08-30 11:25 UTC
查看更新说明
What's Changed
CI/CD
- Fix CD pipeline by @o2sh
Full Changelog: https://github.com/o2sh/onefetch/compare/2.28.0...2.28.1
- 2.28.02026-08-30 · 2026-08-30 10:58 UTC
查看更新说明
What's Changed
New Features
- add language support for Just by @o2sh in b0b974263e7bda087c85e9d20d446a5a3d7ccdd2
- add language support for Mojo by @ruvasqm in https://github.com/o2sh/onefetch/pull/1500
- add language support for Batch file by @spenserblack in https://github.com/o2sh/onefetch/pull/1745
- Add language support for Slang by @arealsquirrel in https://github.com/o2sh/onefetch/pull/1759
Bug Fixes
- Prevent churn calculation from returning an error on partial clones by @lawrence3699 in https://github.com/o2sh/onefetch/pull/1736
CI/CD
- Use renovate for dependency updates by @o2sh in https://github.com/o2sh/onefetch/pull/1793
- Automate debian package release in CD by @o2sh in https://github.com/o2sh/onefetch/pull/1831
Chores
- add FAQ to README by @o2sh in https://github.com/o2sh/onefetch/pull/1769
- Fix typos in comments and documentation by @maxtaran2010 in https://github.com/o2sh/onefetch/pull/1791
New Contributors
- @ruvasqm made their first contribution in https://github.com/o2sh/onefetch/pull/1500
- @lawrence3699 made their first contribution in https://github.com/o2sh/onefetch/pull/1736
- @arimu1 made their first contribution in https://github.com/o2sh/onefetch/pull/1764
- @maxtaran2010 made their first contribution in https://github.com/o2sh/onefetch/pull/1791
Full Changelog: https://github.com/o2sh/onefetch/compare/2.27.1...2.28.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Onefetch - Command-line Git information tool
Onefetch is a command-line Git information tool that displays project information and code statistics for a local Git repository directly in your terminal. The tool works completely offline with a focus on performance and customizability.
![]() | ![]() |
Installation
Onefetch is available on Linux, macOS, and Windows platforms. Binaries for Linux, Windows, and macOS are available on the release page.
Linux
-
Ubuntu
wget https://github.com/o2sh/onefetch/releases/latest/download/onefetch_amd64.deb && sudo dpkg -i ./onefetch_amd64.deb && rm onefetch_amd64.deb -
Arch Linux
pacman -S onefetch -
openSUSE
zypper install onefetch
macOS
brew install onefetch
Windows
winget install onefetch
Usage
onefetch /path/of/your/repo
Or
cd /path/of/your/repo
onefetch
Customization
Onefetch can be customized via command-line arguments to display exactly what you want, the way you want it: adjust the text styling, disable info lines, ignore files and directories, output in multiple formats (JSON, YAML), etc.
Frequently Asked Questions
Why isn't my language detected?
By default, onefetch only displays programming and markup languages. Languages classified as prose (like Org mode, Markdown, or Text) or data (like JSON, YAML, or TOML) are hidden unless you include them with --type.
onefetch --type programming markup prose data
Why do duplicate authors appear?
Onefetch reads authors from the Git history. If the same person committed with different names or emails, they may appear more than once.
To merge those entries, add a .mailmap file to the repository.
Contributing
Currently, onefetch supports more than 100 different programming languages; if your language of choice isn't supported, open an issue and support will be added.
Contributions are very welcome! See CONTRIBUTING for more info.

