The Sorcha CLI (sorcha) is a .NET 10 global tool for managing the Sorcha distributed ledger platform. It uses System.CommandLine 2.0.2 for command parsing, Refit for HTTP API clients, and Spectre.Console for rich terminal output.
| Option constructor | new Option ("--id", "Description") | new Option ("--id", "-i") | | Add short alias | option.Aliases.Add("-i") | Second constructor param | | Option name property | Returns "--id" (with dashes) | Does NOT return "id" | | Get option value | parseResult.GetValue(option) | parseResult.GetValueForOption() |
| Set action | this.SetAction(async (pr, ct) => {...}) | Override Execute | | Test find option | o.Name == "--id" | o.Aliases.Contains("--id") |
Builds and maintains the Sorcha CLI tool using System.CommandLine 2.0.2, Refit HTTP clients, and Spectre.Console. Use when: Creating CLI commands, adding options/arguments, implementing Refit service clients, writing CLI tests, or fixing command structure issues. Source: stuartf303/sorcha.