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,37 +24,58 @@ _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.
4049
4150
4251### ` -p ` , ` --print "script" `
52+ <!-- YAML
53+ added: v0.6.4
54+ -->
4355
4456Identical to ` -e ` but prints the result.
4557
4658
4759### ` -c ` , ` --check `
60+ <!-- YAML
61+ added: v4.2.0
62+ -->
4863
4964Syntax check the script without executing.
5065
5166
5267### ` -i ` , ` --interactive `
68+ <!-- YAML
69+ added: v0.7.7
70+ -->
5371
5472Opens the REPL even if stdin does not appear to be a terminal.
5573
5674
5775### ` -r ` , ` --require module `
76+ <!-- YAML
77+ added: v1.6.0
78+ -->
5879
5980Preload the specified module at startup.
6081
@@ -63,48 +84,75 @@ rules. `module` may be either a path to a file, or a node module name.
6384
6485
6586### ` --no-deprecation `
87+ <!-- YAML
88+ added: v0.8.0
89+ -->
6690
6791Silence deprecation warnings.
6892
6993
7094### ` --trace-deprecation `
95+ <!-- YAML
96+ added: v0.8.0
97+ -->
7198
7299Print stack traces for deprecations.
73100
74101
75102### ` --throw-deprecation `
103+ <!-- YAML
104+ added: v0.11.14
105+ -->
76106
77107Throw errors for deprecations.
78108
79109
80110### ` --trace-sync-io `
111+ <!-- YAML
112+ added: v2.1.0
113+ -->
81114
82115Prints a stack trace whenever synchronous I/O is detected after the first turn
83116of the event loop.
84117
85118
86119### ` --zero-fill-buffers `
120+ <!-- YAML
121+ added: v4.5.0
122+ -->
87123
88124Automatically zero-fills all newly allocated [ Buffer] [ ] and [ SlowBuffer] [ ]
89125instances.
90126
91127
92128### ` --track-heap-objects `
129+ <!-- YAML
130+ added: v2.4.0
131+ -->
93132
94133Track heap object allocations for heap snapshots.
95134
96135
97136### ` --prof-process `
137+ <!-- YAML
138+ added: v4.4.0
139+ -->
98140
99141Process v8 profiler output generated using the v8 option ` --prof ` .
100142
101143
102144### ` --v8-options `
145+ <!-- YAML
146+ added: v0.1.3
147+ -->
103148
104149Print v8 command line options.
105150
106151
107152### ` --tls-cipher-list=list `
153+ <!-- YAML
154+ added: v4.0.0
155+ -->
108156
109157Specify an alternative default TLS cipher list. (Requires Node.js to be built
110158with crypto support. (Default))
@@ -123,36 +171,54 @@ Force FIPS-compliant crypto on startup. (Cannot be disabled from script code.)
123171
124172
125173### ` --icu-data-dir=file `
174+ <!-- YAML
175+ added: v0.11.15
176+ -->
126177
127178Specify ICU data load path. (overrides ` NODE_ICU_DATA ` )
128179
129180
130181## Environment Variables
131182
132183### ` NODE_DEBUG=module[,…] `
184+ <!-- YAML
185+ added: v0.1.32
186+ -->
133187
134188` ',' ` -separated list of core modules that should print debug information.
135189
136190
137191### ` NODE_PATH=path[:…] `
192+ <!-- YAML
193+ added: v0.1.32
194+ -->
138195
139196` ':' ` -separated list of directories prefixed to the module search path.
140197
141198_ Note: on Windows, this is a ` ';' ` -separated list instead._
142199
143200
144201### ` NODE_DISABLE_COLORS=1 `
202+ <!-- YAML
203+ added: v0.3.0
204+ -->
145205
146206When set to ` 1 ` colors will not be used in the REPL.
147207
148208
149209### ` NODE_ICU_DATA=file `
210+ <!-- YAML
211+ added: v0.11.15
212+ -->
150213
151214Data path for ICU (Intl object) data. Will extend linked-in data when compiled
152215with small-icu support.
153216
154217
155218### ` NODE_REPL_HISTORY=file `
219+ <!-- YAML
220+ added: v3.0.0
221+ -->
156222
157223Path to the file used to store the persistent REPL history. The default path is
158224` ~/.node_repl_history ` , which is overridden by this variable. Setting the value
0 commit comments