bosun 0.2.2 icon indicating copy to clipboard operation
bosun: ^0.2.2 copied to clipboard

A library for parsing CLI input and structuring CLI commands

example/bosun.dart

import 'package:bosun/bosun.dart';

class AppCmd extends Command {
  AppCmd() : super(command: 'app', description: 'run as an app shell');

  @override
  void run(List<String> args, Map<String, dynamic> flags) {
    print("in the app command callback");
  }
}

class RunCmd extends Command {
  RunCmd()
      : super(
            command: 'run',
            description: 'Run a command in a shell',
            subcommands: [AppCmd()]);
}

void main(List<String> args) {
  execute(
      BosunCommand('donker',
          description: 'The donker CLI tool', subcommands: [RunCmd()]),
      args);
}
3
likes
140
pub points
26%
popularity

Publisher

unverified uploader

A library for parsing CLI input and structuring CLI commands

Repository

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

Dependencies

tree_iterator

More

Packages that depend on bosun