colorful_cmd 1.6.9 copy "colorful_cmd: ^1.6.9" to clipboard
colorful_cmd: ^1.6.9 copied to clipboard

A library for building a beautiful command line application in dart.

A library for building a beautiful command line application in dart.

GitHub repo size GitHub Last Tag GitHub last commit

Support Pub Version

GitHub stars GitHub forks

Dependency #

  • console
  • args

Preview #

Diff OS #

  • Ubuntu Ubuntu
  • Windows Windows
  • Mac Mac

ColorText #

ColorText

Command #

Command

RainbowProgress #

RainbowProgress

WindowUI #

WindowUI WindowUI2

Usage #

A simple usage example:

import 'package:dart_command/command.dart';
import 'package:dart_command/logger.dart';

void main(List<String> args) {
  var kernel = ConsoleKernel();
  kernel.addCommands([RootCommand()])
        .run(args);
}

class RootCommand extends ICmd {

  @override
  String name = 'root';

  @override
  String description = 'root command, without group';

  @override
  List<Flag> get flags => null;

  @override
  List<ILogHandler> get logHandlers => null;

  @override
  List<Option> get options => null;
  
  @override
  void run() {
    warning(description);
    var colorText = ColorText();
    colorText
      .gold('\n\n\ngold\n')
      .green('green\n')
      .blue('blue\n')
      .cyan('cyan\n')
      .darkBlue('darkBlue\n')
      .darkRed('darkRed\n')
      .gray('gray\n')
      .lightCyan('lightCyan\n')
      .lightGray('lightGray\n')
      .lightMagenta('lightMagenta\n')
      .lime('lime\n')
      .magenta('magenta\n')
      .red('red\n')
      .white('white\n')
      .black('black\n')
      .yellow('yellow\n')
      .print();
  }
}

For more examples, see the example folder.

1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A library for building a beautiful command line application in dart.

Homepage

License

MIT (LICENSE)

Dependencies

args, console

More

Packages that depend on colorful_cmd