Skip to main content

dotnet-cli-from-engine

Stars13
Forks0
UpdatedJune 3, 2026 at 20:05

Wrap an existing C#/.NET engine or library as a headless command-line tool with System.CommandLine, so the logic that powers a GUI can run in batch or CI without a UI. Use when adding a CLI front end to a library, when building a console app that parses options and arguments, when you need subcommands, exit codes, piping, or progress output, when running a renderer or processor over many files unattended, or when packaging a tool as a dotnet global tool. Covers keeping the engine pure and the CLI a thin shell, the System.CommandLine model of RootCommand, Option and Argument and a handler, parsing and validation, non-zero exit codes on failure, progress to stderr while results go to stdout, and packaging with PackAsTool. Triggers on System.CommandLine, build a CLI, console app, dotnet tool, command line parser, RootCommand, headless, batch processing tool, subcommands, exit codes, wrap a library as a CLI.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly