countloc is a simple CLI to count the number of lines of code in your directory that you wrote.
LOC metrics generation script implementation in Ruby.