CodeLines 1.0.1
dotnet tool install --global CodeLines --version 1.0.1
dotnet new tool-manifest
dotnet tool install --local CodeLines --version 1.0.1
#tool dotnet:?package=CodeLines&version=1.0.1
nuke :add-package CodeLines --version 1.0.1
Codelines - a dotnet tool to calculate your lines of code performance
A CLI tool for counting lines of code in your projects, excluding empty lines and generated code.
Description
CodeLine Counter is a console application for .NET developers that helps analyze projects and get statistics on code line count. The tool ignores empty lines and can be configured to exclude generated code or other files based on patterns.
Installation
dotnet tool install --global CodeLineCounter
Core Commands
Initialization
cline init [--path|-p <project_directory>] [--force|-f]
Initializes a project directory by creating a .clineIgnore file to configure which files and directories to ignore.
Parameters:
--path, -p- path to the project directory (default: current directory)--force, -f- force create a new.clineIgnorefile, overwriting any existing one
Scanning
cline scan [--path|-p <project_directory>] [--diff|-d] [--verbose|-v]
Scans the project and calculates the lines of code.
Parameters:
--path, -p- path to the project directory (default: current directory)--diff, -d- shows difference with previous scan results--verbose, -v- provides detailed output
Scan History
cline history [--path|-p <project_directory>] [--last|-l <number_of_entries>]
Shows the history of project scans.
Parameters:
--path, -p- path to the project directory (default: current directory)--last, -l- number of recent history entries to display
Managing Ignored Files
Add Pattern
cline ignore add <pattern> [--path|-p <project_directory>]
Adds a pattern to the .clineIgnore file.
Remove Pattern
cline ignore remove <pattern> [--path|-p <project_directory>]
Removes a pattern from the .clineIgnore file.
List Patterns
cline ignore list [--path|-p <project_directory>]
Shows the list of ignored patterns.
Usage Examples
Basic Scan of Current Directory
cline scan
Scan with Difference Display
cline scan --diff
Adding an Ignore Pattern
cline ignore add "**/*.Designer.cs"
View Last 5 Scans
cline history --last 5
.clineIgnore File Format
The .clineIgnore file uses syntax similar to .gitignore:
# Comment
bin/
obj/
**/*.Designer.cs
**/Generated/*.cs
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 186 | 4/13/2025 |