A library for parsing CLI input and structuring CLI commands

pub version codecov points likes


  • Structure CLI commands in a nice, uniform fashion.
  • Parse args and flag information from a command tree.
  • Auto generate meaningful output when nonsensical commands are ran.
  • EVENTUALLY meaningful feature suggestions from you!

Getting started

Add Bosun to your dependencies. See example (or usage below) for more information. Additional information coming soon.


Bosun is simple to use! You'll leverage Bosun's Command class to structure your own commands. Additionally, you'll new up one BosunCommand and pass arguments to it. This is usually done directly in your main method, but doesnt have to be.

import 'package:bosun/bosun.dart';

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

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

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

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

void main(List<String> args) {
  execute(BosunCommand('donker', subcommands: [RunCmd()]), args);


Support for doing something awesome.