.Dd April 10, 2015 .Dt IEX 1 .Os .Sh NAME .Nm iex .Nd The Elixir shell .Sh SYNOPSIS .Nm .Op Ar OPTIONS .Sh DESCRIPTION The interactive shell is used for evaluation, debugging and introspection of the Elixir runtime system. It is also possible to use the program for testing the work of small pieces of code escaping the stage of saving the code in a file. .Sh OPTIONS Note that many of the options mentioned here were borrowed from the Erlang shell, therefore .Xr erl 1 can be used as an additional source of information on the options. .Bl -tag -width Ds .It Fl e Ar expression Evaluates the specified expression. .It Fl r Ar file Requires the specified file. In other words, the file is checked for existence at the start of .Nm . .It Fl S Ar script Runs the specified script. .It Fl pa Ar directory Adds the specified directory to the beginning of the code path. If the directory already exists, it will be removed from its old position and put to the beginning. .Pp See also the function .Sy Code.prepend_path/1 . .It Fl pr Ar file Does the same thing as .Fl r .Pq see above but in parallel. .It Fl pz Ar directory Adds the specified directory to the end of the code path. If the directory already exists, it will be neither removed from its old position nor put to the end. .Pp See also the function .Sy Code.append_path/1 . .It Fl -app Ar application Starts the specified application and all its dependencies. .It Fl -erl Ar parameters Serves the same purpose as ELIXIR_ERL_OPTIONS .Pq see the Sy ENVIRONMENT No section .It Fl -cookie Ar value Specifies the magic cookie value. If the value isn't specified via the option when the node starts, it will be taken from the file .Pa ~/.erlang.cookie .Pq see the Sy FILES No section . Distributed nodes can interact with each other only when their magic cookies are equal. .Pp See also the function .Sy Node.set_cookie/2 . .It Fl -detached Runs the Erlang runtime system detached from the controlling terminal. .It Fl -hidden Starts a hidden node. .Pp Connections between nodes are transitive. For example, if node A is connected to node B, and node B is connected to node C, then node A is connected to node C. The option .Fl -hidden allows creating a node which can be connected to another node, escaping redundant connections. .Pp The function .Sy Node.list/0 allows getting the list of nodes connected to the target node, however the list won't include hidden nodes. Depending on the input parameter, the function .Sy Node.list/1 allows getting the list which contains only hidden nodes .Pq the parameter Ar :hidden or both hidden and not hidden nodes .Pq the parameter Ar :connected . .It Fl -sname Ar name Gives a node a short name and starts it. Short names take the form of .Ar name Ns @host, where host is the name of the target host .Pq Xr hostname 1 which runs the node. The nodes with short names can interact with each other only in the same local network. .It Fl -name Ar name Gives a node a long name and starts it. Long names take the form of .Ar name Ns @host, where host is the IP address of the host which runs the node. In contrast to the nodes with short names, the nodes with long names aren't limited by boundaries of a local network .Pq see above . .It Fl -dot-iex Ar file Loads the specified file instead of .Pa .iex.exs .Pq see the Sy FILES No section . .It Fl -remsh Ar node Connects to the specified node which was started with the .Fl -sname or .Fl -name options .Pq see above . .It Fl - Separates the options passed to the compiler from the options passed to the executed code. .El .Sh ENVIRONMENT .Bl -tag -width Ds .It Ev ELIXIR_ERL_OPTIONS Allows passing parameters to the Erlang runtime. .El .Sh FILES .Bl -tag -width Ds .It Pa ~/.erlang.cookie Stores the magic cookie value which is used only when it wasn't specified via the option .Fl -cookie .Pq see above . If the file doesn't exist when a node starts, it will be created. .It Pa .iex.exs After .Nm starts, it seeks the file .Pa .iex.exs and, in a case of success, executes the code from the file in the context of the shell. At first the search starts in the current working directory, then, if necessary, it continues in the home directory. .El .Sh SEE ALSO .Xr elixir 1 , .Xr elixirc 1 , .Xr mix 1 .Sh AUTHOR This manual page contributed by Evgeny Golyshev. .Sh INTERNET RESOURCES .Bl -tag -width Ds .It Main website: http://elixir-lang.org .It Documentation: http://elixir-lang.org/docs.html .El