Skip to content
CAI
Software that uses CAICheck a score

fsprojects/Argu

57.4

Adequate · 23 September 2026

3.4k

lines of production code

F#

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Argu is a .NET command-line argument parser library that provides a fluent API for defining and parsing CLI arguments. The system supports configuration via environment variables, appsettings, and Microsoft.Extensions.Configuration, while offering introspection capabilities for building complex, nested command structures. It also includes performance benchmarking tools and prepares for future Ahead-of-Time compilation through source generation markers.

Features

Add Argu.Samples.Introspect sample demonstrating the introspection API

A new sample project, Argu.Samples.Introspect, has been added to demonstrate the Argu introspection API. It shows how to use ArgumentParser.GetArgumentCases() to retrieve metadata about every argument case, and GetSubCommandParsers() to access untyped parsers for subcommands. The sample includes a visitor pattern implementation to recover typed parsers from untyped ones, and a recursive dump function that prints argument details and help text for a 'git'-style command structure.

samples/Argu.Samples.Introspect · high confidence

Add BenchmarkDotNet harness for performance testing

Added a new benchmarking suite using BenchmarkDotNet to measure the performance of the argument parser. The suite includes three specific benchmarks: SchemaBuild, which measures the cost of constructing the reflection-based parser; Parse, which measures the cost of parsing command-line arguments; and HelpRender, which measures the cost of rendering the usage string. These benchmarks allow for tracking performance changes over time.

benchmarks · high confidence

Add Microsoft.Extensions.Configuration support and AOT/trimming annotations

Users can now configure arguments via Microsoft.Extensions.Configuration by using the new ConfigurationReader.FromMicrosoftConfiguration helper. The parser also exposes ProgramName and supports localisable usage strings. To support Ahead-of-Time (AOT) compilation and trimming, the codebase includes polyfilled RequiresDynamicCode and RequiresUnreferencedCode attributes, ensuring that consumers using publish-AOT or trimming see appropriate warnings about reflection usage.

src/Argu · high confidence

Add ls sample implementation

A new sample demonstrating a command-line argument parser for the 'ls' command is added to the codebase. The implementation defines a comprehensive set of arguments (e.g., -a, -l, --color) and their corresponding help text, providing a reference for building similar CLI tools.

samples/Argu.Samples.LS · high confidence

Added \[ArguGenerate\] marker attribute for future compile-time schema generation

A new \\[ArguGenerate\]\ attribute has been introduced in the \Argu.SourceGenerator\ package to opt in to compile-time schema generation. Currently, applying this attribute has no effect as the source generator is not yet implemented; the attribute serves as a placeholder for future AOT-compatible, reflection-free parsing. Users can now annotate their CLI templates with this marker in preparation for the upcoming generator, which will eliminate runtime reflection and improve startup performance.

samples/Argu.Samples.SourceGenerated, src/Argu.SourceGenerator · high confidence

Removals

Removal of ArgParser library

The ArgParser library, including its core implementation, utility modules, and test scripts, has been removed from the codebase. This eliminates the ability to parse command-line arguments and application settings using the previous attribute-based approach.

ArgParser · high confidence

Architecture

Refactor CLI and appsettings parsing into dedicated modules

The parser logic for command-line arguments and application settings has been split from the main module into new files: Cli.fs for CLI tokenization and result aggregation, KeyValue.fs for key-value configuration parsing, and Common.fs for shared types and post-processing. This structural change improves code organization and maintainability of the argument parsing pipeline.

src/Argu/Parsers · high confidence

Repository structure and build infrastructure overhaul

The repository has been reorganized to use the modern .NET SDK-style project structure, replacing the legacy .sln file with a new .slnx solution file and introducing a FAKE-based build script (build.fsx) for automation. The project now targets netstandard2.0 and utilizes global.json to pin the .NET SDK version, while also adding .editorconfig for consistent formatting and .dockerignore to streamline Docker builds. These changes standardize the development environment and improve build reliability.

(repo-wide) · high confidence

Test coverage

Added comprehensive test coverage for configuration readers and usage string localization

Added new test files (CoverageTests, EnvVarTests, PrimitiveTests, SeparatorAttributeTests, Tests, UsageStringsTests) that validate configuration reader behavior (including environment variable prefixing and AppSettings edge cases), primitive argument parsing, separator attribute handling, and the localization of usage strings in help output.

tests · high confidence

Dependencies

Migrate to .NET 10 and xUnit v3

The project has been upgraded to target .NET 10.0, with all test and benchmark projects now running on this latest framework. Additionally, the test suite has been migrated from xUnit 2.x to xUnit v3 (specifically the Microsoft Testing Platform v2 integration), and the solution now uses central package management via Directory.Packages.props to standardize dependency versions.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 61 → 57 (-3.8)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 82 → 74 (-8.3)
  • Architecture 100 → 94 (-5.7)
  • Maturity 51 → 36 (-15.7)
  • Readiness 65 → 74 (+9.5)
  • Security 64 → 83 (+18.7)

Resolved (13)

  • Duplicated block (10 lines × 2) (src/Argu/UnParsers.fs)
  • Duplicated block (6 lines × 2) (src/Argu/PreCompute.fs)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium IaC: CKV_DOCKER_3 (Dockerfile)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included

New (15)

  • Documentation: no architecture or design documentation (src/Argu.SourceGenerator/README.md)
  • Documentation: no project overview (README.md)
  • Duplicated block (16–17 lines × 2) (src/Argu/UnParsers.fs)
  • Duplicated block (6 lines × 2) (src/Argu/PreCompute.fs)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium IaC: WD-DOCKER-0003 (Dockerfile)
  • Off-boarding risk: anonymized user #1
  • Outdated: xunit.v3.mtp-v2
  • Scattered collaborators

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

fsprojects/Argu was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 23 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 8dcad5bab1f49dd1eaac77ef9895daa0c9ca5744 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-955b9cee9818.