count lines of code

How many lines of code a project has, in total and by language.

developmenttext

steps
  1. cloc .

    lines of code, comments and blanks, by language (cloc)

  2. tokei

    the same, faster (tokei)

  3. git ls-files | xargs wc -l | tail -1

    the lines of every file git tracks

  4. find . -name '*.py' -print0 | xargs -0 wc -l | tail -1

    the lines of every .py file

commands used

cloctokeiwcgit

Each has a page in lore: lore cloc opens it.