BosunCommand class
BosunCommand is the entry point into bosun from your application Generally your main method for your CLI will create a BosunCommand passing in your application name and any subcommands and then pass that to Bosun's execute method to process and execute the command. See the example folder in the Bosun repo for more information.
Constructors
-
BosunCommand(String appName, {String description = '', required List<
Command> subcommands})
Properties
-
aliases
↔ List<
String> ? -
Aliases that should work the same was as the provided command name
getter/setter pairinherited
- command ↔ String
-
The name of the command
getter/setter pairinherited
- description ↔ String?
-
A description of the command, consider putting documentation here.
getter/setter pairinherited
- example ↔ String?
-
An example of how to run the command.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subcommands
↔ List<
Command> ? -
Any subcommands that belong under this command.
getter/setter pairinherited
-
supportedFlags
↔ Map<
String, String> ? -
Any flags that are supported and a description of their purpose.
Your command can leverage flags outside of the supported flags,
but this provides a way to document what flags are available for
autogenerated help text.
getter/setter pairinherited
- use ↔ String?
-
getter/setter pairinherited
Methods
-
getAllLogicalNames(
) → List< String> -
Returns a list of all possibly command names that this command should run from
including the original name and all aliases
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postRun(
List< String> args, Map<String, dynamic> flags) → void -
PostRun defines what code should be ran after the command is executed.
Consider using this to clean up or free resources after the command is run.
inherited
-
preRun(
List< String> args, Map<String, dynamic> flags) → void -
PreRun defines what code should be ran before the command is executed.
Consider using this to set things up before the command is run.
inherited
-
printHelp(
) → dynamic -
Prints a small blurb about the command using properties to generate it's data.
inherited
-
run(
List< String> args, Map<String, dynamic> flags) → void -
Run defines what code should be ran when this command is executed.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited