ClarcCli class

Runs Clarc commands programmatically.

Most developers use the global clarc executable, but this class is useful when another Dart tool wants to invoke Clarc with an argument list and inspect the resulting process-style exit code.

final exitCode = await ClarcCli().run([
  'create',
  'module',
  'auth',
  '--project-dir',
  './my_app',
]);

Constructors

ClarcCli({ClarcLogger? logger, CliIo io = const CliIo(), FileEditor? editor})
Creates a command-line runner for the clarc executable.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(List<String> arguments) Future<int>
Runs Clarc with arguments and returns a process-friendly exit code.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited