onefetch
Display project information and source code statistics
TLDR
Display statistics for the Git repository in the current working directory
Display statistics for the Git repository in the specified directory
Ignore commits made by bots
Ignore merge commits
Don't print the ASCII art of the language logo
Show n authors, languages, or file churns (default: 3, 6, and 3 respectively)
Ignore the specified files and directories
Only detect languages from the specified categories (default: programming and markup)
SYNOPSIS
onefetch [OPTIONS] [PATH]
PARAMETERS
--input
Specify the input directory for analysis (defaults to current directory).
--output
Write output to a file instead of standard output.
--ascii-input
Use a custom ASCII art file.
--ascii-language
Force the ASCII art to be of a specific language (e.g., 'Rust', 'Python').
--json
Output the information in JSON format.
--display-mode
Set the display mode. Can be 'compact' or 'full'.
--no-info
Disable a specific information module (e.g., 'git', 'dependencies', 'languages'). Can be used multiple times.
--disable-metadata
Disable all metadata information (project name, author, license, etc.).
--exclude
Exclude files or directories matching the glob pattern.
--include
Include files or directories matching the glob pattern (useful with --exclude).
--branch
Analyze a specific Git branch.
--config
Specify a custom configuration file.
--help
Display help message and exit.
--version
Display version information and exit.
DESCRIPTION
onefetch is a command-line Git information tool written in Rust that fetches and displays Git repository details directly in your terminal. It presents a concise summary of your project, including programming languages used, lines of code, contributors, commits, license, dependencies, and more. What sets onefetch apart is its ability to integrate ASCII art representing the dominant programming language or a custom image, making the output visually appealing and easily digestible. It's highly customizable, allowing users to select which information to display, format the output (e.g., JSON), and even specify custom ASCII art or disable certain modules. It's ideal for quickly understanding project demographics, showcasing your work, or simply adding a touch of flair to your command-line interface.
CAVEATS
Performance on very large repositories with extensive commit history might be slow.
It relies on a valid Git repository being present in the specified or current directory.
The accuracy of dependency detection varies by language and relies on common manifest files.
CONFIGURATION
onefetch supports a configuration file (e.g., ~/.config/onefetch/config.toml or .onefetch.toml in the project root) for persistent customization. This file allows users to set default options for ASCII art, disabled modules, colors, and more, avoiding the need to specify them with command-line arguments every time.
INSTALLATION
Typically installed via package managers (e.g., cargo install onefetch, or from distribution repositories like apt, dnf, brew). Rust's robust ecosystem makes cross-platform compilation straightforward.
HISTORY
onefetch was created by o2sh and is written in Rust, leveraging Rust's performance and memory safety. It was inspired by similar tools like neofetch but focuses specifically on Git repository information. Its development has been driven by the open-source community, with continuous improvements in feature set, language support, and customization options since its initial release, establishing itself as a popular tool for developers to get quick, aesthetically pleasing insights into their projects.