CLI

To interact with the Deno runtime environment from your terminal or command prompt.

Execution

Command
Description

To run scripts.

To run a web server.

To run tasks configured in deno.json. (Ex.: deno task build)

It is possible to provide runtime arguments to your scripts.

deno run main.ts arg1 arg2 arg3

Inside main.ts you grab the arguments with:

console.log(Deno.args);
triangle-exclamation

Supply the --watch to run, test, fmt to enable the built-in file watcher.

The watcher enables automatic reloading of your application whenever changes are detected on the source files.

(Similar to nodemon for Node)

Other common flags

Can be checked in the docsarrow-up-right.

Dependency Management

Command
Description

Add dependencies.

Install a dependency or a script.

Uninstall a dependency or a script.

Remove dependencies.

View or update outdated dependencies.

Tooling

Command
Description

Upgrade deno to last version.

Create a new project.

Generate test coverage reports.

Generate documentation for a module.

Benchmarking tool.

Compile a program into a standalone executable.

Format your code.

Last updated