Developed by 🦏 zoocityboy
- Argument parser
- CommandRunner, Command definition
- Command flow components
- Process helpers (executors)
- Tracing, Logging
- Themable
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);
}
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 = selectOne<String>(
'Your favorite programming language',
options: languages,
);
print('${languages[selection]}');
It will result in something like this,
Install the latest version of Promptly as a dependency as shown in pub.dev.
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.