CodeMetrics.CLI for C# projects in VS Code and Visual Studio CodeMetrics.CLI, a new .NET global tool for C# projects, measures code complexity and maintainability directly from source syntax without restoring or compiling, offering metrics such as cyclomatic and cognitive complexity, and supports table, JSON, and HTML report formats. The tool is designed for developers, code reviews, CI gates, and AI agent workflows to verify code quality, with commands like `codemetrics ./src --format html --output report.html` and configurable thresholds via `--max-cognitive` and `--max-cyclomatic`. CodeMetrics.Cli is a .NET global tool for measuring code quality and complexity in C source files without restoring or compiling the target project. With a time will give you quick feedback on your project code complexity. It is designed for developers, code reviews, CI gates, and agent-driven workflows that need quick, deterministic complexity metrics from source text alone. Allows AI Agents to verify code they produce, ensuring it meets complexity and maintainability standards keeping code readable and maintainable. The --format html report: summary tiles, complexity and maintainability charts, risk distribution, and a sortable member table. dotnet tool install --global CodeMetrics.Cli codemetrics ./src codemetrics ./src --format json --output metrics.json codemetrics ./src --format html --output report.html codemetrics -s src/Checkout.cs codemetrics ./src --max-cognitive 15 --max-cyclomatic 10 The tool inspects C syntax and reports member-level metrics including: - Cyclomatic complexity - Cognitive complexity - Parameter count - Nesting depth - Maintainability index - Lines of code - Source summary totals A report row is produced for each of these, when it has a body: - Methods, constructors, destructors, operators and conversion operators - Property, indexer and event accessors get , set , init , add , remove - Expression-bodied properties and indexers - A top-level statement program, reported once as