System Commandline

Use when building or modifying a .NET command-line app with System.CommandLine (RootCommand, Command, Option<T>, Argument<T>) on the current GA / 2.x–3.x API. This library had a large breaking redesign at 2.0 GA, so training data and web snippets are FULL of the removed beta stack (SetHandler, AddOption, BinderBase, IConsole). The #1 silent trap: the Option/Argument constructor's 2nd positional argument is an ALIAS, not a description. Covers the small core shape. Pull actions/invocation for dedicated Command.Action classes or cancellation; options/arguments for HelpName, completion, stable case-insensitivity, custom parsing, or cross-option validators; beta migration, subcommands/help, and 3.x additions are separate. Don't web-search this API.

richlander Updated

File contents

richlander/dotnet-package-skills/tree/main/examples/system-commandline/skills/system-commandline commit 485da0fa31

Frequently asked questions

npx skillmds@latest add richlander/system-commandline