What does DCli do?
Writing your first CLI app
Add DCli to your project
Dart lambda functions
stdin/stdout/stderr a primer
Using DCli functions
Managing Files And Directories
Command Line Arguments
The evils of CD
Use a shebang #!
build CLI apps in dart - part 1
build CLI apps in dart - part 2
Dealing with permissions
Dart on Linux - the perfect CLI tooling
Improving your build environment
Olivier Revial - CLI apps made easy
Video: package of the week
The Examples section is intended to be a grab bag of samples that demonstrate various techniques that you can use to solve problems with DCli.
Feel free to use any of the code as your own.
A bare bones hello world example.
Utility that is able to dcompress multiple file types. It uses the file extension to select the appropriate tool to decompress the file with.
It does require that the appropriate OS tool is already installed.
Prints a list of the PATH directories and checks that each one is valid.
Allows you to save the connection arguments to the mysql cli command to connect to multiple databases. Once configured you can connect by typing
An example REPL shell.
Dart implementation of the class
command bit it also validates the PATH and prints all occurances of the app that it finds in the order they appear on the PATH.
Prints out each of the local IP address bound to your machine in a human readable format.
Examples - Previous