cli/args_helpers library

Functions

fmtBytes(int bytes) String
Formats bytes as a human-readable string with one decimal place.
parseXY(String raw) → (double, double)?
Parses an "x,y" coordinate string into a (double, double) tuple, or returns null if the input is malformed.
runCliAdapter(ArgParser parser, List<String> args, Future<int> execute(ArgResults)) Future<int>
Runs a CLI adapter end-to-end:
runSimpleCliAdapter(List<String> args, Future<int> execute(List<String>), {String helpText = 'No options for this command.'}) Future<int>
Runs a CLI adapter that accepts no options. Skips ArgParser construction entirely; just intercepts --help/-h and otherwise calls execute with the raw args (allowing the executor to inspect positional arguments).