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
17 Erlang shell, therefore erl(1) can be used as an additional source of
18 information on the options.
19
20 -e expression
21 Evaluates the specified expression.
22
23 -r file
24 Requires the specified file. In other words, the file is checked
25 for existence at the start of iex.
26
27 -S script
28 Runs the specified script.
29
30 -pa directory
31 Adds the specified directory to the beginning of the code path.
32 If the directory already exists, it will be removed from its old
33 position and put to the beginning.
34
35 See also the function Code.prepend_path/1.
36
37 -pr file
38 Does the same thing as -r (see above) but in parallel.
39
40 -pz directory
41 Adds the specified directory to the end of the code path. If the
42 directory already exists, it will be neither removed from its old
43 position nor put to the end.
44
45 See also the function Code.append_path/1.
46
47 --app application
48 Starts the specified application and all its dependencies.
49
50 --erl parameters
51 Serves the same purpose as ELIXIR_ERL_OPTIONS (see the
52 ENVIRONMENT section)
53
54 --cookie value
55 Specifies the magic cookie value. If the value isn't specified
56 via the option when the node starts, it will be taken from the
57 file ~/.erlang.cookie (see the FILES section). Distributed nodes
58 can interact with each other only when their magic cookies are
59 equal.
60
61 See also the function Node.set_cookie/2.
62
63 --detached
64 Runs the Erlang runtime system detached from the controlling ter‐
65 minal.
66
67 --hidden
68 Starts a hidden node.
69
70 Connections between nodes are transitive. For example, if node A
71 is connected to node B, and node B is connected to node C, then
72 node A is connected to node C. The option --hidden allows creat‐
73 ing a node which can be connected to another node, escaping
74 redundant connections.
75
76 The function Node.list/0 allows getting the list of nodes con‐
77 nected to the target node, however the list won't include hidden
78 nodes. Depending on the input parameter, the function Node.list/1
79 allows getting the list which contains only hidden nodes (the
80 parameter :hidden) or both hidden and not hidden nodes (the
81 parameter :connected).
82
83 --sname name
84 Gives a node a short name and starts it. Short names take the
85 form of name@host, where host is the name of the target host
86 (hostname(1)) which runs the node. The nodes with short names can
87 interact with each other only in the same local network.
88
89 --name name
90 Gives a node a long name and starts it. Long names take the form
91 of name@host, where host is the IP address of the host which runs
92 the node. In contrast to the nodes with short names, the nodes
93 with long names aren't limited by boundaries of a local network
94 (see above).
95
96 --dot-iex file
97 Loads the specified file instead of .iex.exs (see the FILES
98 section).
99
100 --remsh node
101 Connects to the specified node which was started with the --sname
102 or --name options (see above).
103
104 -- Separates the options passed to the compiler from the options
105 passed to the executed code.
106
108 ELIXIR_ERL_OPTIONS
109 Allows passing parameters to the Erlang runtime.
110
112 ~/.erlang.cookie
113 Stores the magic cookie value which is used only when it wasn't
114 specified via the option --cookie (see above). If the file
115 doesn't exist when a node starts, it will be created.
116
117 .iex.exs
118 After iex starts, it seeks the file .iex.exs and, in a case of
119 success, executes the code from the file in the context of the
120 shell. At first the search starts in the current working direc‐
121 tory, then, if necessary, it continues in the home directory.
122
124 elixir(1), elixirc(1), mix(1)
125
127 This manual page contributed by Evgeny Golyshev.
128
130 Main website: https://elixir-lang.org
131
132 Documentation: https://elixir-lang.org/docs.html
133
134BSD April 10, 2015 BSD