1IEX(1) BSD General Commands Manual IEX(1)
2
4 iex — The Elixir shell
5
7 iex [OPTIONS]
8
10 The interactive shell is used for evaluation, debugging and introspection
11 of the Elixir runtime system. It is also possible to use the program for
12 testing the work of small pieces of code escaping the stage of saving the
13 code in a file.
14
16 Note that many of the options mentioned here were borrowed from the Er‐
17 lang shell, therefore erl(1) can be used as an additional source of in‐
18 formation on the options.
19
20 -h, --help
21 Displays the help message to the standard error (stderr) and ex‐
22 its.
23
24 -v, --version
25 Displays the Elixir version to the standard output (stdout) and
26 exits.
27
28 -e, --eval expression
29 Evaluates the specified expression (see the --rpc-eval option).
30
31 -r file
32 Requires the specified file. In other words, the file is checked
33 for existence at the start of iex.
34
35 -S script
36 Runs the specified script.
37
38 -pa directory
39 Adds the specified directory to the beginning of the code path.
40 If the directory already exists, it will be removed from its old
41 position and put to the beginning.
42
43 See also the function Code.prepend_path/1.
44
45 -pr file
46 Does the same thing as -r (see above) but in parallel.
47
48 -pz directory
49 Adds the specified directory to the end of the code path. If the
50 directory already exists, it will be neither removed from its old
51 position nor put to the end.
52
53 See also the function Code.append_path/1.
54
55 --app application
56 Starts the specified application and all its dependencies.
57
58 --boot file
59 Specifies the name of the boot file, file.boot, which is used to
60 start the system. Unless File contains an absolute path, the
61 system searches for file.boot in the current and $ROOT/bin
62 directories.
63
64 Defaults to $ROOT/bin/start.boot.
65
66 The option is equivalent to Erlang's -boot.
67
68 --boot-var var dir
69 If the boot script contains a path variable var other than $ROOT,
70 this variable is expanded to dir. Used when applications are in‐
71 stalled in another directory than $ROOT/lib.
72
73 The option is equivalent to Erlang's -boot_var.
74
75 See also the function :systools.make_script/1,2 in SASL.
76
77 --erl parameters
78 Serves the same purpose as ELIXIR_ERL_OPTIONS (see the
79 ENVIRONMENT section)
80
81 --erl-config file
82 Specifies the name of a configuration file, file.config, which is
83 used to configure applications. Note that the configuration file
84 must be written in Erlang.
85
86 The option is equivalent to Erlang's -config.
87
88 --cookie value
89 Specifies the magic cookie value. If the value isn't specified
90 via the option when the node starts, it will be taken from the
91 file ~/.erlang.cookie (see the FILES section). Distributed nodes
92 can interact with each other only when their magic cookies are
93 equal.
94
95 See also the function Node.set_cookie/2.
96
97 --hidden
98 Starts a hidden node.
99
100 Connections between nodes are transitive. For example, if node A
101 is connected to node B, and node B is connected to node C, then
102 node A is connected to node C. The option --hidden allows creat‐
103 ing a node which can be connected to another node, escaping re‐
104 dundant connections.
105
106 The function Node.list/0 allows getting the list of nodes con‐
107 nected to the target node, however the list won't include hidden
108 nodes. Depending on the input parameter, the function Node.list/1
109 allows getting the list which contains only hidden nodes (the
110 parameter :hidden) or both hidden and not hidden nodes (the
111 parameter :connected).
112
113 --logger-otp-reports val
114 Enables or disables OTP reporting (val can be either true or
115 false).
116
117 --logger-sasl-reports val
118 Enables or disables SASL reporting (val can be either true or
119 false).
120
121 --sname name
122 Gives a node a short name and starts it. Short names take the
123 form of name@host, where host is the name of the target host
124 (hostname(1)) which runs the node. The nodes with short names can
125 interact with each other only in the same local network.
126
127 --name name
128 Gives a node a long name and starts it. Long names take the form
129 of name@host, where host is the IP address of the host which runs
130 the node. In contrast to the nodes with short names, the nodes
131 with long names aren't limited by boundaries of a local network
132 (see above).
133
134 --pipe-to pipedir logdir
135 Starts the Erlang VM as a named pipedir and logdir (only for
136 Unix-like operating systems).
137
138 --rpc-eval node expression
139 Evaluates the specified expression on the specified node (see the
140 --eval option).
141
142 --vm-args file
143 Reads the command-line arguments from file and passes them to the
144 Erlang VM.
145
146 The option is equivalent to Erlang's -args_file.
147
148 --werl Uses Erlang's Windows shell GUI (only for Windows).
149
150 --dot-iex file
151 Loads the specified file instead of .iex.exs (see the FILES
152 section).
153
154 --remsh node
155 Connects to the specified node which was started with the --sname
156 or --name options (see above).
157
158 -- Separates the options passed to the compiler from the options
159 passed to the executed code.
160
162 The following options can be given more than once: --boot-var,
163 --erl-config, --eval, --rpc-eval.
164
166 ELIXIR_ERL_OPTIONS
167 Allows passing parameters to the Erlang runtime.
168
170 ~/.erlang.cookie
171 Stores the magic cookie value which is used only when it wasn't
172 specified via the option --cookie (see above). If the file
173 doesn't exist when a node starts, it will be created.
174
175 .iex.exs
176 After iex starts, it seeks the file .iex.exs and, in a case of
177 success, executes the code from the file in the context of the
178 shell. At first the search starts in the current working direc‐
179 tory; then, if necessary, it continues in the home directory.
180
182 elixir(1), elixirc(1), mix(1)
183
185 Elixir is maintained by the Elixir Core Team.
186
187 This manual page was contributed by Evgeny Golyshev.
188
189 Copyright (c) 2012 Plataformatec.
190
192 Main website: https://elixir-lang.org
193
194 Documentation: https://elixir-lang.org/docs.html
195
196BSD February 3, 2019 BSD