The Dart VM


You can use the dart tool (bin/dart) to run Dart command-line apps such as server-side scripts, programs, and servers.

Basic usage

Here’s an example of running a Dart file on the command line:

$ dart --enable-asserts test.dart


Common command-line options for dart include:

Enables assert statements. When asserts are enabled, an assert statement checks a boolean condition, raising an exception if the condition is false.
Specifies the path to the package resolution configuration file. This option cannot be used with --package-root.
Displays VM version information.
-h or --help
Displays help. (Add -v for information about all options.)