tallyman 1.0.2

dotnet tool install --global tallyman --version 1.0.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local tallyman --version 1.0.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=tallyman&version=1.0.2
                    
nuke :add-package tallyman --version 1.0.2
                    

tallyman

A small command-line tool that counts the lines in every file under a directory and prints the results as a table with a running total.

Built with C# and Spectre.Console.

Install

As a .NET global tool

Requires the .NET SDK.

From the solution root (the folder containing the .sln):

dotnet pack src/tallyman.Cli -c Release
dotnet tool install --global --add-source ./src/tallyman.Cli/bin/Release tallyman

To update after making changes, bump <Version> in src/tallyman.Cli/tallyman.Cli.csproj, pack again, then run:

dotnet tool update --global --add-source ./src/tallyman.Cli/bin/Release tallyman

To uninstall:

dotnet tool uninstall --global tallyman

Usage

tallyman <directories...>
Argument Description
<directories...> One or more directories to count

Examples

Count lines in the current folder:

tallyman .

Count lines in a specific project:

tallyman ~/projects/my-app

Count lines from multiple directories:

tallyman ./Packages ./src

Output

Each directory gets its own table, with files listed alphabetically and paths relative to that directory, followed by a footer with the file count and total lines. When you pass more than one directory, a grand total is printed at the end.

Exit codes

Code Meaning
0 Success (including when no files found)
1 One of the given directories does not exist

Notes

  • Subdirectories are searched recursively.
  • Every file is counted, including binary files, so pointing it at folders like bin/, obj/, or .git/ will give meaningless numbers.
  • Colors are only shown in a real terminal. They are stripped when output is redirected (for example tallyman . > out.txt) or when the NO_COLOR environment variable is set.

Development

Run from source:

dotnet run --project src/tallyman.Cli -- ./some-folder

Run the tests:

dotnet test
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.2 107 9/29/2026