Can you get the number of lines of code from a GitHub repository?

Not currently possible on Github.com or their API-s

I have talked to customer support and confirmed that this can not be done on github.com. They have passed the suggestion along to the Github team though, so hopefully it will be possible in the future. If so, I’ll be sure to edit this answer.

Meanwhile, Rory O’Kane’s answer is a brilliant alternative based on cloc and a shallow repo clone.

Leave a Comment