ToolRunner class
Runs tools based on their definitions.
Handles argument parsing, help display, command routing, traversal execution, and nested tool wiring.
Constructors
-
ToolRunner({required ToolDefinition tool, Map<
String, CommandExecutor> executors = const {}, bool verbose = true, StringSink? output})
Properties
-
executors
→ Map<
String, CommandExecutor> -
Command executors by name.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- output → StringSink
-
Output writer (default: stdout).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tool → ToolDefinition
-
Tool definition.
final
- verbose → bool
-
Whether to print output.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
List< String> args) → Future<ToolResult> - Run the tool with command-line arguments.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited