.Dd February 3, 2019 .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 h , -help Displays the help message to the standard error (stderr) and exits. .It Fl v , -version Displays the Elixir version to the standard output (stdout) and exits. .It Fl e , -eval Ar expression Evaluates the specified expression .Pq see the Fl -rpc-eval No option . .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 -boot Ar file Specifies the name of the boot file, .Ar file Ns .boot, which is used to start the system. Unless File contains an absolute path, the system searches for Ar file Ns .boot in the current and $ROOT/bin directories. .Pp Defaults to $ROOT/bin/start.boot. .Pp The option is equivalent to Erlang's .Fl boot . .It Fl -boot-var Ar var Ar dir If the boot script contains a path variable .Ar var other than $ROOT, this variable is expanded to .Ar dir . Used when applications are installed in another directory than $ROOT/lib. .Pp The option is equivalent to Erlang's .Fl boot_var . .Pp See also the function .Sy :systools.make_script/1,2 No in SASL . .It Fl -erl Ar parameters Serves the same purpose as ELIXIR_ERL_OPTIONS .Pq see the Sy ENVIRONMENT No section .It Fl -erl-config Ar file Specifies the name of a configuration file, .Ar file Ns .config, which is used to configure applications. Note that the configuration file must be written in Erlang. .Pp The option is equivalent to Erlang's .Fl config . .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 -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 -logger-otp-reports Ar val Enables or disables OTP reporting .Pq Ar val No can be either true or false . .It Fl -logger-sasl-reports Ar val Enables or disables SASL reporting .Pq Ar val No can be either true or false . .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 -pipe-to Ar pipedir Ar logdir Starts the Erlang VM as a named .Ar pipedir and .Ar logdir .Pq only for Unix-like operating systems . .It Fl -rpc-eval Ar node Ar expression Evaluates the specified expression on the specified node .Pq see the Fl -eval No option . .It Fl -vm-args Ar file Reads the command-line arguments from .Ar file and passes them to the Erlang VM. .Pp The option is equivalent to Erlang's .Fl args_file . .It Fl -werl Uses Erlang's Windows shell GUI .Pq only for Windows . .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 NOTES The following options can be given more than once: .Fl -boot-var Ns , Fl -erl-config Ns , Fl -eval Ns , Fl -rpc-eval Ns . .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 .Bl -tag -width Ds .It Elixir is maintained by The Elixir Team. .It This manual page was contributed by Evgeny Golyshev. .It Copyright (c) 2012 Plataformatec. .It Copyright (c) 2021 The Elixir Team. .El .Sh INTERNET RESOURCES .Bl -tag -width Ds .It Main website: https://elixir-lang.org .It Documentation: https://elixir-lang.org/docs.html .El