Deno Commands

Post installing deno, when we type --help on the command prompt, we get a list of sub-commands. These are the deno commands we will be looking at.

deno --help

deno commands

Deno Commands

Here is the list of deno commands along with a short description.

  • bundle bundle module and dependencies of a project into a single file
  • cache cache the dependencies
  • completions generate shell completions
  • doc show documentation for a module
  • eval to evaluate a piece of code, e.g. deno eval “console.log(1 + 2)”
  • fmt a built-in code formatter (similar to gofmt in Go)
  • help prints this message or the help of the given subcommand(s)
  • info show info about cache or info related to the source file
  • install install script as an executable
  • repl Read-Eval-Print-Loop (the default)
  • run run a program given a filename or URL to the module
  • test run tests
  • types print runtime TypeScript declarations
  • upgrade upgrade deno to the newest version

You can run deno <subcommand> help to get specific additional documentation for the command.

For example:

deno run --help

This will list all the options available to use along with the run command.