Loading

Features

Every feature listed here is implemented at compile time by the Roslyn source generator. No reflection runs at runtime. No separate tooling step is required.

Source-generated - The generator emits typed dispatch, parsers, help printers, and completion tables directly into your assembly. You can read, debug, and step through the generated code.

AOT and trimming safe - Zero reflection means your CLI publishes cleanly with Native AOT or the IL trimmer. No special configuration needed.

XML docs are your help text - Write <summary>, <param>, <remarks>, and <example> once on your handler methods. They appear in --help automatically.

Shell completions - Tab completion for commands, namespaces, and flags. One install command for bash, zsh, or fish.

Fuzzy matching - Typos produce actionable error messages with the correct qualified command path and a --help suggestion.

DataAnnotations validation - Standard .NET validation attributes ([Range], [StringLength], [AllowedValues], [Existing]) generate inline checks. Constraints appear in help output.

DTO binding - Annotate a record or class with [AsParameters] to expand its members into individual CLI flags. Supports prefixes and inheritance.

Agent-ready JSON schema - myapp __schema emits a full JSON description of your CLI conforming to cli-schema v1. Feed it to LLMs, generate docs, or diff in CI.

Middleware - Cross-cutting concerns (timing, auth, logging) live in ICommandMiddleware implementations. Wire them globally or per-command with [MiddlewareAttribute<T>].

Cancellation - Add CancellationToken to any handler signature. It tracks Ctrl+C in console apps, or links to host shutdown with Nullean.Argh.Hosting.