LexaCount




Lightweight and versatile command-line tool designed to simplify counting source lines of code.

Whether you're a developer reviewing codebases, a project manager tracking progress, or simply curious about code metrics, LexaCount provides an efficient way to analyze and understand the structure of your source code with various options that adapt to your needs.



Screenshot


Screenshot of LexaCount

Screenshot of LexaCount with command line lexacount -l lexacount.lst -b -t



Usage


lexacount [-b] [-t] [-x] [-l <list file 1>] [-l <list file 2>] ... [file1] [file2] ...

Switches

Example usages




Using lists


Using a list file is a beneficial addition to LexaCount, allowing for the automation of counting lines in a large codebase with unlimited files. The list file should contain file names separated by newlines, with each line representing a single file. For example, a list file named lines.list would look like this:

src/include/main.h
src/include/input.h
src/main.c
src/input.c
make.sh
website/index.html

By calling lexacount -l lines.list, LexaCount will count the lines of code for the files listed inside lines.list and not the lines of the list file itself. This command loads file names from lines.list and counts the lines for each specified file, streamlining the process of analyzing multiple files.



Compatibility


LexaCount has been written in standard C99 without making use of any platform-specific libraries. This makes LexaCount compatible with Windows, Linux, and Mac.



Contributing & License


If you found a bug or want to add a new feature, don't hesitate to create a pull request or an issue! Contributions are greatly appreciated.

LexaCount is distributed under the GNU GPL v3.0 license. See the LICENSE file for details.