Git repository summary on your terminal

Overview

A command-line Git information tool written in Rust

cargo Build Status help wanted

Onefetch is a command-line Git information tool written in Rust that displays project information and code statistics for a local Git repository directly on your terminal. The tool is completely offline - no network access is required.

By default, the repo's information is displayed alongside the dominant language's logo, but you can further configure onefetch to instead use an image - on supported terminals -, a text input or nothing at all.

It automatically detects open source licenses from texts and provides the user with valuable information like code distribution, pending changes, number of dependencies (by package manager), top contributors (by number of commits), size on disk, creation date, LOC (lines of code), etc.

Onefetch can be configured via command-line flags to display exactly what you want, the way you want it to: you can customize ASCII/Text formatting, disable info lines, ignore files & directories, output in multiple formats (Json, Yaml), etc.

As of now, onefetch supports more than 50 different programming languages; if your language of choice isn't supported: Open up an issue and support will be added.

Contributions are very welcome! See CONTRIBUTING for more info.

More: [Wiki] [Installation] [Getting Started]

Issues
  • Added HolyC support

    Added HolyC support

    The logo is just like the C logo but with a cross, and with TempleOS colors

    opened by Ferryistaken 20
  • Omit part of display depending on terminal size?

    Omit part of display depending on terminal size?

    If I open a split terminal in say VSCode, onefetch (obviously) gets really deformed image

    We can use the term_size crate to get terminal size, and from there, omit either the ASCII logo or the insignts.

    The question then becomes which one we should remove. I'm thinking logo, but I want to know what you think.


    • [ ] Prevent line wrap by default with print!("\x1B[?7l") - I'll take care of that one.
    • [x] Add options to the -off CLI flag (rename it to --hide-logo) to automatically hide the art if the term_size is too small.
    opened by Luke-zhang-04 20
  • feat: cloning remote repository

    feat: cloning remote repository

    closes #419

    • [x] Cloning remote repository from HTTP URL
    • [x] Caching repositories
    • [x] Progress bars(git clone may take some time)
    • [x] ~~Improve performance by fetching with depth = 1~~ I can't find option in git2 library
    opened by gbaranski 17
  • Output is terrible on windows

    Output is terrible on windows

    This is what it looks like on rust-analyzer.

                                             Project: rust-analyzer
                 `  :y.`yy`.y:  `            HEAD: 0cce2bc (master, origin/master, origin/staging)
             -``MNsNMMNNNNMMNsNM``-          Version: guide-2019-01
          ` -MMNMMMMNNm``NNNMMMMNMM- `       Created: 1 year, 10 months ago
         `NNNMMMdo:` `+md/  `:odMMMNNN`      Languages: Rust (96.38 %) TypeScript (3.57 %) JavaScript (0.04 %)
       -ssNMMNo.                .oNMMNss-               Shell (0.01 %)
       `mMMMMNmmmmmmmmmmmmmmmdy+` `sMMMm`    Authors: 40% Aleksey Kladov 2128
     `mMMMMMMMMMMMMMMMMMMMMMMMMMN/  hMMMMm`           25% bors[bot] 1313
     -oMN-:Ny:mMMMMMm    oNMMMMMm oN::MMo-            5% Florian Diebold 296
    .yMMMhhh+ dMMMMMd:::::+mMMMMN/ odyhMMMy. Last change: 4 hours ago
    -sNMMy    dMMMMMMMMMMMMMMMMs`    `yMMNs- Repo: https://github.com/rust-analyzer/rust-analyzer.git
    -sNMMy    dMMMMMNyyyydMMMMMMy   .odMMNs- Commits: 5227
    .yMMMm   dMMMMMh     +MMMMMM+  sMMMMMy.  Lines of code: 61872
     -oMMMMMMMMMMMMMMMMM+  mMMMMMMMMMMMMMo-  Size: 18.96 MiB (889 files)
     `mMMMMMMMMMMMMMMMMM+  :NMMMMMMMMMMMMm`  License: Apache License 2.0
       `mMMMm               `-:o+:/mMMMm`
       -ssNMMMyomo            smohMMMNss-
         `NNNMs+mN/-`      `-/Nd/yMNNN`
          ` -MMNMMMMMNmmmmNMMMMMNMM- `
             -``MNsNMMNMMNMMNsNM``-
                `  :y.`yy`.y:  `
    
    opened by kjeremy 16
  • add dependency feature

    add dependency feature

    Add dependency field

    opened by Luke-zhang-04 15
  • nix derivation

    nix derivation

    I would like a Nix derivation, so one can build with nix-build, and maybe someone could even get it into nixpkgs, so it is available on any system running nix. This feature would need a Cargo.lock file, and a default.nix, I will see that I build that files

    OS: Linux 
    opened by Kloenk 13
  • I made homebrew formula

    I made homebrew formula

    I made a homebrew formula for this: Cj-bc/homebrew-onefetch Actually it's not so good(ex: doesn't use 'make' to install), but It should work. I wonder this helps someone ;)

    opened by Cj-bc 13
  • Support COLORTERM for TrueColor ASCII

    Support COLORTERM for TrueColor ASCII

    After working on the swift logo I was thinking it might be useful to be able to specify true colors for a better result:

    image

    Terminals that don't support COLORTERM environment variable would look like this: image

    opened by atluft 13
  • Size: 0 bytes (24 files) ....  wut?

    Size: 0 bytes (24 files) .... wut?

    ❯ onefetch --version
    onefetch 2.7.3
    ❯ onefetch
                 :::::::::::::                 Subhaditya Nath ~ git version 2.29.2
               ::::::::::::::::::              ------------------------------------
              :::   ::::::::::::::             Project: nvim-ghost.nvim (7 branches, 20 tags)
              ::::::::::::::::::::             HEAD: e6e8042 (main, github/main)
                        ::::::::::             Version: v0.0.20
        :::::::::::::::::::::::::: ______      Created: 10 weeks ago
      :::::::::::::::::::::::::::: ________    Languages: Python (84.2 %) Shell (15.8 %) 
     ::::::::::::::::::::::::::::: _________   Dependencies: 4 (pip)
    :::::::::::::::::::::::::::::  _________   Authors: 85% Subhaditya Nath 100
    ::::::::::::::::::::::::::    __________            6% Subhaditya Nath 8
    :::::::::::  ___________________________            6% Restyled.io 8
    :::::::::  _____________________________   Last change: 3 days ago
     :::::::: _____________________________    Repo: https://github.com/subnut/nvim-ghost.nvim.git
     :::::::: _____________________________    Commits: 117
       :::::: __________________________       Lines of code: 368
              ____________________             Size: 0 bytes (24 files)
              ____________________             License: MIT
              ______________   ___             
               __________________                                      
                  _____________             
    

    Using onefetch-bin from AUR

    opened by subnut 12
  • Improve performance

    Improve performance

    Onefetch's performance isn't so good to say the least. Even if we rely heavily on other tools for core functionalities (language statistics, license detection, git information), the post processing done by Onefetch adds a "significant" overhead - Moving forward, will require specific benchmarks to account for performance gain/losses - But a quick test on a relatively large repo Linux can give us a first idea:

    o2sh:~/dev/linux (master) $ time onefetch --> 0m34,531s o2sh:~/dev/linux (master) $ time tokei --> 0m11,897s

    To achieve good performance some fundamental changes have to be made. Doing that will take a while because it makes it necessary to replace some core abstractions. The good news is that improving or even replacing those abstractions will have other benefits beside improved performance.


    There are three primary paths for improving performance:

    1. Refactoring
    2. Caching
    3. Asynchronicity/Multi-threading

    So aside from this overview, these changes will also be discussed independently, in dedicated issues.

    discussion help wanted pinned 
    opened by o2sh 11
  • Translate README.md in Russian 🇷🇺

    Translate README.md in Russian 🇷🇺

    It would be great to have a multiple translations of the README.md in order to make it more accessible for non English-speaker to use the tool. These translations will be accessible directly from the English README.md via hyperlinks and placed in the docs folder.

    If you're a native Russian-speaker :ru: and are willing to help, your contribution would be more than appreciated :100:

    documentation good first issue help wanted 
    opened by o2sh 0
  •  Translate README.md in Chinese 🇨🇳

    Translate README.md in Chinese 🇨🇳

    It would be great to have a multiple translations of the README.md in order to make it more accessible for non English-speaker to use the tool. These translations will be accessible directly from the English README.md via hyperlinks and placed in the docs folder.

    If you're a native Chinese-speaker :cn: and are willing to help, your contribution would be more than appreciated :100:

    documentation good first issue help wanted 
    opened by o2sh 0
  • RUSTSEC-2020-0077: memmap is unmaintained

    RUSTSEC-2020-0077: memmap is unmaintained

    memmap is unmaintained

    | Details | | | ------------------- | ---------------------------------------------- | | Status | unmaintained | | Package | memmap | | Version | 0.7.0 | | URL | https://github.com/danburkert/memmap-rs/issues/90 | | Date | 2020-12-02 |

    The author of the memmap crate is unresponsive.

    Maintained alternatives:

    See advisory page for additional details.

    opened by github-actions[bot] 0
  • RUSTSEC-2020-0036: failure is officially deprecated/unmaintained

    RUSTSEC-2020-0036: failure is officially deprecated/unmaintained

    failure is officially deprecated/unmaintained

    | Details | | | ------------------- | ---------------------------------------------- | | Status | unmaintained | | Package | failure | | Version | 0.1.8 | | URL | https://github.com/rust-lang-nursery/failure/pull/347 | | Date | 2020-05-02 |

    The failure crate is officially end-of-life: it has been marked as deprecated by the former maintainer, who has announced that there will be no updates or maintenance work on it going forward.

    The following are some suggested actively developed alternatives to switch to:

    See advisory page for additional details.

    opened by github-actions[bot] 0
  • Please add Smalltalk support

    Please add Smalltalk support

    When used in a Smalltalk repo like https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev it misidentifies it as CSS.

    pinned 
    opened by Kirtai 4
  • Improve language detection system to recognize C++ headers

    Improve language detection system to recognize C++ headers

    https://github.com/github/linguist

    Linguist is a tool developed by GitHub for the specific purpose of detecting languages. It's a very mature tool that gets it right the majority of the time by using complex rules.

    Type: Feature Request discussion 
    opened by aaronfranke 13
Releases(v2.9.1)
Owner
Ossama Hjaji
Ossama Hjaji
Browse Reddit from your terminal

THIS PROJECT IS NO LONGER MAINTAINED RTV Development is Shutting Down List of Alternative Projects Reddit Terminal Viewer (RTV) A text-based interface

Michael Lazar 4.5k Jun 3, 2021
:mag: Google from the terminal

googler is a power tool to Google (web, news, videos and site search) from the command-line. It shows the title, URL and abstract for each result, whi

Piña Colada 5.2k Jun 6, 2021
Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.

Glances - An eye on your system Summary Glances is a cross-platform monitoring tool which aims to present a large amount of monitoring information thr

Nicolas Hennion 18.5k Jun 6, 2021
:speech_balloon: Command-line translator using Google Translate, Bing Translator, Yandex.Translate, etc.

Translate Shell Translate Shell (formerly Google Translate CLI) is a command-line translator powered by Google Translate (default), Bing Translator, Y

Mort Yao 5k Jun 6, 2021
Linux Kernel Manager and Activity Monitor 🐧💻

Linux Kernel Manager and Activity Monitor ?? ?? The kernel is the part of the operating system that facilitates interactions between hardware and soft

Orhun Parmaksız 1.2k Jun 1, 2021
Terminal-based CPU stress and monitoring utility

The Stress Terminal UI: s-tui Stress-Terminal UI, s-tui, monitors CPU temperature, frequency, power and utilization in a graphical way from the termin

Alex Manuskin 2.6k Jun 3, 2021
:duck: DuckDuckGo from the terminal

ddgr ddgr is a cmdline utility to search DuckDuckGo (html version) from the terminal. While googler is extremely popular among cmdline users, in many

Piña Colada 2.1k Jun 5, 2021
cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.

cloc Count Lines of Code cloc counts blank lines, comment lines, and physical lines of source code in many programming languages. Latest release: v1.9

null 11.7k Jun 7, 2021
Magnificent app which corrects your previous console command.

The Fuck The Fuck is a magnificent app, inspired by a @liamosaur tweet, that corrects errors in previous console commands. Is The Fuck too slow? Try t

Vladimir Iakovlev 62.3k Jun 5, 2021
A smart and nice Twitter client on terminal written in Python.

A Note about Twitter API Change Heads-up! As Twitter discontinues supporting Stream API, RainbowStream's stream function has been stopped working for

orakaro.targaryen 3.3k May 31, 2021
:bookmark: Browser-independent bookmark manager

buku buku in action! Introduction buku is a powerful bookmark manager written in Python3 and SQLite3. When I started writing it, I couldn't find a fle

Piña Colada 4.5k Jun 6, 2021
A smarter cd command for your terminal

zoxide A smarter cd command for your terminal zoxide is a blazing fast replacement for your cd command, inspired by z and z.lua. It keeps track of the

Ajeet D'Souza 2.7k Jun 6, 2021
Git repository summary on your terminal

A command-line Git information tool written in Rust Onefetch is a command-line Git information tool written in Rust that displays project information

Ossama Hjaji 3.1k Jun 6, 2021
A modern replacement for ‘ls’.

exa exa is a modern replacement for ls. README Sections: Options — Installation — Development exa is a modern replacement for the venerable file-listi

Benjamin Sago 13.5k Jun 6, 2021