Node.js v10.24.1 Documentation


Table of Contents

Command Line Options#

Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options.

To view this documentation as a manual page in a terminal, run man node.

Synopsis#

node [options] [V8 options] [script.js | -e "script" | -] [--] [arguments]

node inspect [script.js | -e "script" | <host>:<port>] …

node --v8-options

Execute without arguments to start the REPL.

For more info about node inspect, please see the debugger documentation.

Options#

All options, including V8 options, allow words to be separated by both dashes (-) or underscores (_).

For example, --pending-deprecation is equivalent to --pending_deprecation.

-#

Alias for stdin, analogous to the use of - in other command line utilities, meaning that the script will be read from stdin, and the rest of the options are passed to that script.

--#