Dependably.CodeMetrics 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Dependably.CodeMetrics --version 0.1.0
                    
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 Dependably.CodeMetrics --version 0.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Dependably.CodeMetrics&version=0.1.0
                    
nuke :add-package Dependably.CodeMetrics --version 0.1.0
                    

codemetrics

Quantitative C# code-quality metrics from one command: cyclomatic and cognitive complexity, Halstead volume, maintainability index, depth of inheritance, class coupling, LCOM4 cohesion, and the Robert Martin namespace metrics. Built on Roslyn, so it runs on any repository with no dotnet restore step. On top of the raw numbers it emits interpreted diagnoses (god class, fragile base class, unmaintainable hotspot, low cohesion, ...) with a severity you can gate on.

Install

Requires the .NET SDK 8.0 or later.

dotnet tool install --global Dependably.CodeMetrics

This puts the codemetrics command on your PATH.

Usage

codemetrics <path>                            # human report
codemetrics <path> --format json              # JSON on stdout
codemetrics <path> --fail-on severity=high    # CI gate: exit 1 if any finding is >= high

Run codemetrics --help for all options (--json, --top, --no-semantic, --exclude, --config, and the full --fail-on gate).

License

Apache-2.0. Part of the Dependably tool suite.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  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 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
0.1.2 159 8/13/2026
0.1.1 148 7/3/2026
0.1.0 137 7/3/2026