A simple command-line tool to greet users.
Install the tool globally using Dart by running the following command from any directory:
dart pub global activate my_cli_tool
Run the tool with the desired options:
my_cli_tool --name Dart
-n
,--name
: The name to greet. Default is 'world'.-h
,--help
: Show the help message.
my_cli_tool --name Flutter
This will output:
Hello, Flutter!
A sample command-line application with an entrypoint in bin/
, library code
in lib/
, and example unit test in test/
.