DOKK / manpages / debian 11 / elixir / iex.1.en
IEX(1) General Commands Manual IEX(1)

iexThe Elixir shell

iex [OPTIONS]

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.

Note that many of the options mentioned here were borrowed from the Erlang shell, therefore erl(1) can be used as an additional source of information on the options.

, --help
Displays the help message to the standard error (stderr) and exits.
, --version
Displays the Elixir version to the standard output (stdout) and exits.
, --eval expression
Evaluates the specified expression (see the --rpc-eval option).
file
Requires the specified file. In other words, the file is checked for existence at the start of iex.
script
Runs the specified script.
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.

See also the function .

file
Does the same thing as -r (see above) but in parallel.
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.

See also the function .

application
Starts the specified application and all its dependencies.
file
Specifies the name of the boot file, file.boot, which is used to start the system. Unless File contains an absolute path, the system searches for file.boot in the current and $ROOT/bin directories.

Defaults to $ROOT/bin/start.boot.

The option is equivalent to Erlang's -boot.

var dir
If the boot script contains a path variable var other than $ROOT, this variable is expanded to dir. Used when applications are installed in another directory than $ROOT/lib.

The option is equivalent to Erlang's -boot_var.

See also the function in SASL.

parameters
Serves the same purpose as ELIXIR_ERL_OPTIONS (see the ENVIRONMENT section)
file
Specifies the name of a configuration file, file.config, which is used to configure applications. Note that the configuration file must be written in Erlang.

The option is equivalent to Erlang's -config.

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 ~/.erlang.cookie (see the FILES section). Distributed nodes can interact with each other only when their magic cookies are equal.

See also the function .

Starts a hidden node.

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 --hidden allows creating a node which can be connected to another node, escaping redundant connections.

The function 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 allows getting the list which contains only hidden nodes (the parameter :hidden) or both hidden and not hidden nodes (the parameter :connected).

val
Enables or disables OTP reporting (val can be either true or false).
val
Enables or disables SASL reporting (val can be either true or false).
name
Gives a node a short name and starts it. Short names take the form of name@host, where host is the name of the target host (hostname(1)) which runs the node. The nodes with short names can interact with each other only in the same local network.
name
Gives a node a long name and starts it. Long names take the form of name@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 (see above).
pipedir logdir
Starts the Erlang VM as a named pipedir and logdir (only for Unix-like operating systems).
node expression
Evaluates the specified expression on the specified node (see the --eval option).
file
Reads the command-line arguments from file and passes them to the Erlang VM.

The option is equivalent to Erlang's -args_file.

Uses Erlang's Windows shell GUI (only for Windows).
file
Loads the specified file instead of .iex.exs (see the FILES section).
node
Connects to the specified node which was started with the --sname or --name options (see above).
--
Separates the options passed to the compiler from the options passed to the executed code.

The following options can be given more than once: --boot-var, --erl-config, --eval, --rpc-eval.

Allows passing parameters to the Erlang runtime.

~/.erlang.cookie
Stores the magic cookie value which is used only when it wasn't specified via the option --cookie (see above). If the file doesn't exist when a node starts, it will be created.
.iex.exs
After iex starts, it seeks the file .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.

elixir(1), elixirc(1), mix(1)

Elixir is maintained by the Elixir Core Team.
 
This manual page was contributed by Evgeny Golyshev.
 
Copyright (c) 2012 Plataformatec.
 

Main website: https://elixir-lang.org
 
Documentation: https://elixir-lang.org/docs.html
 
February 3, 2019 Debian