🔨 Dart CLI

Run and compile Dart programs from the command line

Create a New Dart Project

Learn about the available commands and how to use them.

command line
dart --help

Create a new project.

command line
dart create -t console-simple my_app

# OR use the current directory (if it's empty)

dart create -t console-simple . --force

Run the application.

command line
dart run

Compile Dart Code

Compile dart code to an executable.

command line
dart compile exe bin/dart.dart
bin/dart.exe

Compile your code to JavaScript and run it with Node.js.

command line
dart compile js bin/dart.dart
node out.js

Questions? Let's chat

Open Discord