#utility #cli #cloc #lines #statistics

app ghloc

List the lines of code of a GitHub repository

3 releases

0.1.2 Nov 21, 2022
0.1.1 Nov 18, 2022
0.1.0 Nov 18, 2022

#179 in Visualization


390 lines

🐙 ghloc-rs

Crates.io Docs.rs codecov license

We have tokei and ghloc.vercel.app for counting lines of code in a GitHub repository. But what if you want to count lines of code in a GitHub repository from the command line? Well, that's what this crate is for.

CLI Showcase

Actively maintained! If you have any problem just create an issue.


cargo install ghloc


ghloc "https://github.com/MrRobb/ghloc-rs"


  • CI / CD:
    • Add tests.
    • Get rid of unwrap().
    • Add no_panic.
  • Code:
    • File selection.
    • Local repository support.
    • Git authentication.
    • Add comments and blank space to the output.
  • UI:
    • Inline statistics.
    • Percentages.
    • Colors for each bar (using github-colors).


Distributed under the MIT License. See LICENSE for more information.


~865K SLoC