Skip to content

A presentation layer framework using MVVM that helps to implement a CLI (command line interface).

License

Notifications You must be signed in to change notification settings

lastunicorn/ConsoleTools.Commando

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Console Tools Commando

This is an MVVM presentation layer framework that helps you create a CLI (command line interface).

How to use (with Autofac)

1) Include the nuget package:

  • ConsoleTools.Commando.Setup.Autofac
  • Note:
    • The ConsoleTools.Commando package will be automatically included.

2) Build and run the Application.

Application application = ApplicationBuilder.Create()
    .RegisterCommandsFrom(typeof(ReadCommand).Assembly) // Provide here the assembly containing your commands.
    .Build();

await application.RunAsync(args);

3) Create your commands.

[NamedCommand("read", Description = "Display the content of a text file.")]
internal class ReadCommand : ICommand
{
    [NamedParameter("file", ShortName = 'f', Description = "The full path of the file.")]
    public string FilePath { get; set; }
    
	public Task Execute()
	{
		...
	}
}

Discussions and Suggestions

https://github.com/lastunicorn/ConsoleTools.Commando/discussions

I appreciate any opinion or suggestion:

  • Did you feel the need for a specific feature?
  • Did you like or dislike something?
  • Do you have questions?
  • etc...

I'm looking forward to hearing from you.

Donations

If you like my work and want to support me, you can buy me a coffee:

ko-fi

About

A presentation layer framework using MVVM that helps to implement a CLI (command line interface).

Resources

License

Stars

Watchers

Forks

Sponsor this project

Languages