# Command Line
Miru is command-line friendly offering a lot of facilities, helping to execute tasks that help you build the application or execute your own tasks. It's based on Oakton.
To see the available commands, in the root of the solution, call miru
or miru help
:
These tasks are called Consolables
. Miru comes with a bunch of them but you can create your own.
# Environment
To run a task targeting a specific environment, the arguments --environment
or -e
can be used:
miru config:show -e Test
miru config:show --environment Staging
The default environment is Development
:
# Consolables
Tasks are Consolables which are classes that implement Miru.Consolables.IConsolable
. In Miru startup, it scans assemblies looking for classes IConsolable.
# Create
Can be created using Miru Makers:
miru make:consolable Hi
# The Consolable
A Consolable has an Input
subclass that can receive arguments from the command line. A Consolable can receive dependencies through constructor.
[Description("Description what this consolable does", Name = "hi")]
public class HiConsolable : Consolable<HiConsolable.Input>
{
public class Input
{
}
public override Task<bool> Execute(Input input)
{
Console.WriteLine("Hi!");
return Task.FromResult(true);
}
}
# Running
WARNING
miru
command run using the compiled binaries from the solution. In case of changes, is required compile the solution