promptly 1.0.0-alpha.2 copy "promptly: ^1.0.0-alpha.2" to clipboard
promptly: ^1.0.0-alpha.2 copied to clipboard

A collection of customizable interactive command-line components.

promptly

Developed by 🦏 zoocityboy

Pub pub points release License: MIT

Dart GitHub Actions

Documentation

Features #

  • ✅ Argument parser
  • ✅ CommandRunner, Command definition
  • ✅ Command flow components
  • ✅ Process helpers (executors)
  • ✅ Tracing, Logging
  • ✅ Themable

Command Runner #

A simple way to write command-line applications in Dart with styling and command loading capabilities.

Future<void> main(List<String> args) async {
  (await Promptly.init('app','MyAppDescription', theme: Theme.make(Theme.defaultColors)))
    ..addCommand(TestCommand())
    ..addCommand(SecondCommand())
    ..addCommand(ThirdCommand());
  .run(args);
}

Components #

A collection of customizable interactive command-line components.

The library contains a bunch of command-line components that are easy to use and customizable, including text and password inputs, radio or select inputs, checkbox or multiple select inputs, spinners, and progress bars. Examples for all the available components can be found in the example folder, and the API Documentation section will cover all about them.

As an overview, you can make a Select component like this.

final languages = ['Rust', 'Dart', 'TypeScript'];
final selection = select<String>(
  'Your favorite programming language',
  options: languages,

);

print('${languages[selection]}');

It will result in something like this,


Installation #

Install the latest version of interact as a dependency as shown in pub.dev.


API Documentation #

Components #

These are the snippets of components with their properties and arguments. Check the pub documentation to get to know more about them in detail.


## License

This project is licensed under the MIT License as provided in the original repository.

1
likes
0
points
152
downloads

Publisher

verified publisherzoocityboy.space

Weekly Downloads

A collection of customizable interactive command-line components.

Homepage
Repository (GitHub)
View/report issues

Topics

#command-line #interactive #components #dart #cli

License

unknown (license)

Dependencies

args, dart_console, get_it, meta, tint, version

More

Packages that depend on promptly