Skip to main content

dotnet-cli-from-engine

星标13
分支0
更新时间2026年6月3日 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.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly