bosun 0.2.2 copy "bosun: ^0.2.2" to clipboard
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);
}
9
likes
150
pub points
25%
popularity

Publisher

unverified uploader

A library for parsing CLI input and structuring CLI commands

Repository

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

tree_iterator

More

Packages that depend on bosun