RazorDocs Search
Example

Console app example

Source of truth

View source Edit this page

Last updated

This sample demonstrates how to build a console application with ForgeTrust.AppSurface.

It defines a module and a greet command. The command uses attributes from the CliFx library—see the CliFx documentation on attributes for more details. Run the sample with:

Bashdotnet run --project examples/console-app/ConsoleAppExample.csproj -- greet World

This will output:

Plain textHello, World!