Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple command-line SLOC counter written in Lua
Lua Makefile
branch: master


A simple, command-line SLOC counter written in Lua.



tar xzvf tally-0.0.5.tar.gz
cd tally-0.0.5
sudo make install


By default, running tally will count every file in every subdirectory below the current working directory. You can change this by specifying files and/or directories as arguments on the command-line, for example:

tally dir1/ file1.c

Paths starting with a dot character (e.g. .git) are excluded, unless specifically added.

A useful .gitconfig alias for git users is:

tally = !git rev-parse && tally $(git ls-files)

...which first checks that the current directory is within a repository, and if it is, counts only the files that are checked in.

Supported Languages

  • ActionScript
  • Ada
  • AppleScript
  • Arduino
  • AsciiDoc
  • AWK
  • Batchfile
  • C
  • C++
  • C#
  • CMake
  • CoffeeScript
  • Common Lisp
  • CSS
  • Cython
  • D
  • Dart
  • Elixir
  • Emacs Lisp
  • Erlang
  • gettext
  • GLSL
  • Go
  • Groovy
  • Haskell
  • INI
  • Java
  • JavaScript
  • Julia
  • Kconfig
  • Lua
  • m4
  • Make
  • MoonScript
  • Nimrod
  • Objective-C
  • Objective-C++
  • Perl
  • PHP
  • pkg-config
  • Protocol Buffer
  • Puppet
  • Python
  • R
  • Ragel
  • Ruby
  • Rust
  • Sass
  • Scala
  • Scheme
  • SED
  • Shell
  • SQL
  • Squirrel
  • SystemTap
  • TCL
  • TeX
  • UnrealScript
  • Vala
  • VimL
  • Visual Basic
  • YAML


Copyright (C) 2012-2014 Craig Barnes

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more details.

Something went wrong with that request. Please try again.