22
33<!-- type=misc-->
44
5- Node.js comes with a wide variety of CLI options. These options expose built-in
5+ Node.js comes with a variety of CLI options. These options expose built-in
66debugging, multiple ways to execute scripts, and other helpful runtime options.
77
88To view this documentation as a manual page in your terminal, run ` man node ` .
@@ -24,38 +24,59 @@ _For more info about `node debug`, please see the [debugger][] documentation._
2424## Options
2525
2626### ` -v ` , ` --version `
27+ <!-- YAML
28+ added: v0.1.3
29+ -->
2730
2831Print node's version.
2932
3033
3134### ` -h ` , ` --help `
35+ <!-- YAML
36+ added: v0.1.3
37+ -->
3238
3339Print node command line options.
3440The output of this option is less detailed than this document.
3541
3642
3743### ` -e ` , ` --eval "script" `
44+ <!-- YAML
45+ added: v0.5.2
46+ -->
3847
3948Evaluate the following argument as JavaScript. The modules which are
4049predefined in the REPL can also be used in ` script ` .
4150
4251
4352### ` -p ` , ` --print "script" `
53+ <!-- YAML
54+ added: v0.6.4
55+ -->
4456
4557Identical to ` -e ` but prints the result.
4658
4759
4860### ` -c ` , ` --check `
61+ <!-- YAML
62+ added: v5.0.0
63+ -->
4964
5065Syntax check the script without executing.
5166
5267
5368### ` -i ` , ` --interactive `
69+ <!-- YAML
70+ added: v0.7.7
71+ -->
5472
5573Opens the REPL even if stdin does not appear to be a terminal.
5674
5775
5876### ` -r ` , ` --require module `
77+ <!-- YAML
78+ added: v1.6.0
79+ -->
5980
6081Preload the specified module at startup.
6182
@@ -64,40 +85,64 @@ rules. `module` may be either a path to a file, or a node module name.
6485
6586
6687### ` --no-deprecation `
88+ <!-- YAML
89+ added: v0.8.0
90+ -->
6791
6892Silence deprecation warnings.
6993
7094
7195### ` --trace-deprecation `
96+ <!-- YAML
97+ added: v0.8.0
98+ -->
7299
73100Print stack traces for deprecations.
74101
75102
76103### ` --throw-deprecation `
104+ <!-- YAML
105+ added: v0.11.14
106+ -->
77107
78108Throw errors for deprecations.
79109
80110### ` --no-warnings `
111+ <!-- YAML
112+ added: v6.0.0
113+ -->
81114
82115Silence all process warnings (including deprecations).
83116
84117### ` --trace-warnings `
118+ <!-- YAML
119+ added: v6.0.0
120+ -->
85121
86122Print stack traces for process warnings (including deprecations).
87123
88124### ` --trace-sync-io `
125+ <!-- YAML
126+ added: v2.1.0
127+ -->
89128
90129Prints a stack trace whenever synchronous I/O is detected after the first turn
91130of the event loop.
92131
93132
94133### ` --zero-fill-buffers `
134+ <!-- YAML
135+ added: v6.0.0
136+ -->
95137
96138Automatically zero-fills all newly allocated [ Buffer] [ ] and [ SlowBuffer] [ ]
97139instances.
98140
99141
100142### ` --preserve-symlinks `
143+ <!-- YAML
144+ added: v6.3.0
145+ -->
101146
102147Instructs the module loader to preserve symbolic links when resolving and
103148caching modules.
@@ -135,16 +180,25 @@ see those as two separate modules and would attempt to load the module multiple
135180times, causing an exception to be thrown).
136181
137182### ` --track-heap-objects `
183+ <!-- YAML
184+ added: v2.4.0
185+ -->
138186
139187Track heap object allocations for heap snapshots.
140188
141189
142190### ` --prof-process `
191+ <!-- YAML
192+ added: v6.0.0
193+ -->
143194
144195Process v8 profiler output generated using the v8 option ` --prof ` .
145196
146197
147198### ` --v8-options `
199+ <!-- YAML
200+ added: v0.1.3
201+ -->
148202
149203Print v8 command line options.
150204
@@ -154,53 +208,80 @@ Note: v8 options allow words to be separated by both dashes (`-`) or underscores
154208For example, ` --stack-trace-limit ` is equivalent to ` --stack_trace_limit ` .
155209
156210### ` --tls-cipher-list=list `
211+ <!-- YAML
212+ added: v4.0.0
213+ -->
157214
158215Specify an alternative default TLS cipher list. (Requires Node.js to be built
159216with crypto support. (Default))
160217
161218
162219### ` --enable-fips `
220+ <!-- YAML
221+ added: v6.0.0
222+ -->
163223
164224Enable FIPS-compliant crypto at startup. (Requires Node.js to be built with
165225` ./configure --openssl-fips ` )
166226
167227
168228### ` --force-fips `
229+ <!-- YAML
230+ added: v6.0.0
231+ -->
169232
170233Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
171234(Same requirements as ` --enable-fips ` )
172235
173236
174237### ` --icu-data-dir=file `
238+ <!-- YAML
239+ added: v0.11.15
240+ -->
175241
176242Specify ICU data load path. (overrides ` NODE_ICU_DATA ` )
177243
178244## Environment Variables
179245
180246### ` NODE_DEBUG=module[,…] `
247+ <!-- YAML
248+ added: v0.1.32
249+ -->
181250
182251` ',' ` -separated list of core modules that should print debug information.
183252
184253
185254### ` NODE_PATH=path[:…] `
255+ <!-- YAML
256+ added: v0.1.32
257+ -->
186258
187259` ':' ` -separated list of directories prefixed to the module search path.
188260
189261_ Note: on Windows, this is a ` ';' ` -separated list instead._
190262
191263
192264### ` NODE_DISABLE_COLORS=1 `
265+ <!-- YAML
266+ added: v0.3.0
267+ -->
193268
194269When set to ` 1 ` colors will not be used in the REPL.
195270
196271
197272### ` NODE_ICU_DATA=file `
273+ <!-- YAML
274+ added: v0.11.15
275+ -->
198276
199277Data path for ICU (Intl object) data. Will extend linked-in data when compiled
200278with small-icu support.
201279
202280
203281### ` NODE_REPL_HISTORY=file `
282+ <!-- YAML
283+ added: v5.0.0
284+ -->
204285
205286Path to the file used to store the persistent REPL history. The default path is
206287` ~/.node_repl_history ` , which is overridden by this variable. Setting the value
0 commit comments