Hacker News new | past | comments | ask | show | jobs | submit login
Git repository summary on your terminal (github.com/o2sh)
155 points by o2sh on Oct 27, 2019 | hide | past | favorite | 26 comments



Patterns of commit activity might be shown using unicode sparklines and/or a color scale (foreground and/or background).

"C++ (41.75 %)" seems a lot of ink and space for "C++ 42%".


Reminds me of Ohloh (now OpenHub) but for your own projects and on command line.


Funny fact: actually there is OpenHub[0] app for Android, that is just GitHub client.

BTW, I just curios, is it possible install & use onefetch using Termux[1] on Android?

[0] https://apt.izzysoft.de/fdroid/index/apk/com.thirtydegreesra...

[1] https://apt.izzysoft.de/fdroid/index/apk/com.termux?repo=mai...


Imagine one wished to collect interesting repo measures and visualizations. Any suggestions on fruitful places to scavenge?

"<This tool> has a nice one." "I frequently find myself checking a repo for <this measure>, and wish it was automated." "<Here's> a pretty way to present <measure>."


“gource” is pretty cool. It generates an animated history of all commits, visualized as authors pushing into files.


It[1] has a surprising large number of videos...[2]

Hmm, the documentation supports their creation.[3] "Encourage your community to create videos" as a way to raise awareness of a code analytics tool... I'd not thought of that.

[1] https://gource.io/ [2] https://www.youtube.com/results?search_query=gource&sp=CAI%2... [3] https://github.com/acaudwell/Gource/wiki/Videos


I just touch it - and it panicked :-/[0]

[0] https://github.com/o2sh/onefetch/issues/120


Nice! In the 2nd screenshot, how is it showing the image? Is that a terminal that can render images, or some clever conversion to ascii art [there's some ascii art related code in the onefetch repo].


It uses `kitty` terminal's built in support for images. [0][1]

[0] https://sw.kovidgoyal.net/kitty/graphics-protocol.html [1] https://github.com/o2sh/onefetch/blob/master/src/image_backe...

Note: iTerm2 also has its own image display protocol and for something more generic there is Sixel or w3mimgdisplay (from w3m).


I think it's iTerm-specific.


this is possible with sixels, if you are really into it


I know this won't be an accurate representation, but sometimes I want to know how many hours I've spent on a repository.

I used git hours for this [0], but it's not well maintained anymore (has some problem on newer node version). I'm curious whether anyone else need this functionality.

[0] https://github.com/kimmobrunfeldt/git-hours


An option to ignore some of the directories of the repository would be a nice addition (ex: ignoring ./vendor/ in golang repository).

Otherwise, nice tool, thanks for creating and sharing it.


What's with the color palette at the bottom? Can I turn off the graphic?

Overall this is almost certainly becoming a staple of my toolbox.


It's trying to be like neofetch for showing off your terminal theme on /r/unixporn


Interestingly enough the color palette doesn't appear for me :)


Wunderbar.


Hahaha. Sorry, that wasn't meant to be a brag. I just know that I haven't turned anything off, so maybe it's a behaviour of a particular commit?

I installed via Cargo, version 1.6.5.


Is there a mac binary or homebrew formula?


`cargo install onefetch` should work


I thought this committed all my terminal commands to a git repo. It doesn’t but now I want something like that.


I hashed together something like this in my dotfiles a few years ago. Big parts were logging each command run to my own history files (marked with machine and date), rotating those logs, and a cronjob to sync it with GitHub.

Only took a few hours to set up.


Do you mean bash/zsh profiles or recent command history?


Command history


script -f filename ?


You could do that with a GitHub action quite easily.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: