README
- https://moeci.com/posts/dotnet-cli-coo/
- https://nikiforovall.github.io/dotnet/cli/2021/06/06/clean-cli.html
- https://github.com/NikiforovAll/clean-cli-todo-example
dotnet run -- -h
dotnet run -- --version
dotnet run -- example -t 标题
dotnet run -- example --title 标题
freekit
FreeKit .NET Command-line Tools
Usage:
IGeekFan.FreeKit.CLI [options] [command]
Options:
-x [default: True]
--silent Disables diagnostics output
--version Show version information
-?, -h, --help Show help and usage information
Commands:
example Example description
dotnet run --silent -x false
dotnet run -h
dotnet run -- example -h
dotnet run -- example --silent -t 我是一标题呗
子命令
example
Example description
Usage:
IGeekFan.FreeKit.CLI [options] example
Options:
-t, --title <title> Title of the Example description
-e, --engines <engines> 设置模板类型
--silent Disables diagnostics output
-?, -h, --help Show help and usage information
直接命令行运行项目 在此目录运行命令:PS FreeKit\src\IGeekFan.FreeKit.CLI>
dotnet run -- example --silent -t 我是一标题呗
launchSettings.json指定参数
example --silent -t 我是一标题呗 -e razor
安装CLI
dotnet tool install --global IGeekFan.FreeKit.CLI --version 0.0.1
使用
freekit example --silent -t 我是一标题呗 -e razor
打包
dotnet pack
PS D:\code\gitee\igeekfan\FreeKit\src\IGeekFan.FreeKit.CLI>
dotnet tool install --global --add-source ./nupkg IGeekFan.FreeKit.CLI --version 0.0.1
--add-source参数指示 .NET Core CLI 临时使用 ./nupkg 文件夹作为 NuGet 包的附加源数据源
dotnet tool uninstall -g IGeekFan.FreeKit.CLI