README

See the online gitbook for Dcli

DCli is an extensive library and tooling for building cross platform command line (CLI) applications and scripts using the Dart programming language.

Looking for DShell? You are in the right place.

DShell has been renamed DCli to better reflect its intended purposes.

Overview

DCli is intended to provide a replacement for bash and similar shell scripting languages with a Dart based scripting tool.

DCli aims to allow you to do everything you currently do with bash while using a modern language.

So why DCli?

Bash is probably the most commonly used scripting tool for system maintenance. Bash has been around for a long time and wasn't so much designed as evolved. The problem now is that its old, has an archaic syntax and doesn't scale well.

So why is DCli different?

DCli is based on the relatively new programming language; Dart.

Dart is currently the fastest growing language on github and is the basis on which Flutter is built. If you have not heard of flutter then you should have a look, but I digress.

If you have used multiple languages you well know how the learning curve goes. Its usually doesn't take long to the get to the point where you love or hate a language. As you begin to discover the little nooks and crannies of a language you either despise the designer's solutions or fall in love with it.

For me at least, it was love at first sight.

Dart is a simple to learn, and uses the all too familiar 'C' style syntax. I've heard Dart described as the love child of Java and Javascript. If you come from either of these environments you will find dart easy to work with.

I've heard Dart described as the love child of Java and Javascript.

Dart provides elegant solutions for common problems and from a scripting perspective hits all of the high notes.

DCli excels in all of the functionality that you expect from Bash and then takes you to the next level.

DCli is easy to install; makes it a breeze to create simple scripts and provides the tools to manage a script that started out as 100 lines but somehow grew to 10,000 lines.

Dart has is also a large and growing eco-system of third party libraries that you can included in your script with no more than an import statement and a dependency declaration.

Dart is fast and if you need even more speed it can be compiled to a single file executable that is portable between binary compatible machines.

You can use your favourite editor to create DCli scripts. Vi or VIM work fine but Visual Code is recommended.

Use Visual Code for the best development experience with Dart.

DCli and Dart also make it harder to make some of the common mistakes that Bash invites.

With Dart and DCli you have the option to Type your variables. This is a bit of a controversial issues, so DCli doesn't force you to Type your scripts but I ALWAYS use types and you should too.

For a long time I've wanted to build a replacement tool that has the elegance of a modern language, with the power of Bash.

DCli is hopefully that.

For more details see the online gitbook:

See the online gitbook for Dcli

See the API documentation at pub.dev

Libraries

dcli