IEX(1)
๐ IEX(1) โ the manual page, but make it a group chat ๐
okay bestie, welcome to the iex manual page, straight out of the General Commands Manual โจ this is literally your ticket to the Elixir shell, and I'm gonna walk you through every single flag like we're texting at 2am ๐ซถ
๐ธ NAME ๐ธ
iex โ The Elixir shell. that's it, that's the name, she's iconic ๐
โจ SYNOPSIS โจ
iex [OPTIONS]
๐ฆ DESCRIPTION ๐ฆ
so the interactive shell is the whole vibe for evaluation, debugging and introspection of the Elixir runtime system ๐ like, you get to poke the runtime and see what it does, live, no cap.
you can also use it for testing small pieces of code without going through the whole drama of saving that code in a file first. no file, no commitment, just vibes ๐
๐ OPTIONS ๐
ngl, a lot of these options were borrowed from the Erlang shell, so if you want extra lore you can hit up erl(1) as an additional source of info. iykyk ๐
-h,--helpโ displays the help message to the standard error (stderr) and exits. she leaves immediately, main character exit ๐-v,--versionโ displays the Elixir version to the standard output (stdout) and exits. short and sweet ๐-e,--evalexpression โ evaluates the specified expression (see the--rpc-evaloption). one-liner queen โจ-rfile โ requires the specified file. in other words, the file gets checked for existence at the start ofiex๐-Sscript โ runs the specified script. go off ๐ฌ-padirectory โ 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
Code.prepend_path/1.
- see also the function
-prfile โ does the same thing as-r(see above) but in parallel. multitasking icon ๐ง-pzdirectory โ 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. lowkey stubborn, respect ๐- see also the function
Code.append_path/1.
- see also the function
--appapplication โ starts the specified application and all its dependencies. bring the whole squad ๐--bootfile โ 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 forfile.bootin the current and$ROOT/bindirectories.- defaults to
$ROOT/bin/start.boot. - the option is equivalent to Erlang's
-boot.
- defaults to
--boot-varvar 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
:systools.make_script/1,2in SASL.
- the option is equivalent to Erlang's
--erlparameters โ serves the same purpose asELIXIR_ERL_OPTIONS(see the ENVIRONMENT section). โจ--erl-configfile โ 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.
- the option is equivalent to Erlang's
--cookievalue โ 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
Node.set_cookie/2.
- see also the function
--hiddenโ 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
--hiddenallows creating a node which can be connected to another node, escaping redundant connections. - the function
Node.list/0allows getting the list of nodes connected to the target node; however, the list won't include hidden nodes. depending on the input parameter, the functionNode.list/1allows getting the list which contains only hidden nodes (the parameter:hidden) or both hidden and not hidden nodes (the parameter:connected).
- 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
--logger-otp-reportsval โ enables or disables OTP reporting (val can be eithertrueorfalse).--logger-sasl-reportsval โ enables or disables SASL reporting (val can be eithertrueorfalse).--snamename โ gives a node a short name and starts it. short names take the form ofname@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 ๐--namename โ gives a node a long name and starts it. long names take the form ofname@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). ๐--pipe-topipedir logdir โ starts the Erlang VM as a named pipedir and logdir (only for Unix-like operating systems). ๐ง--rpc-evalnode expression โ evaluates the specified expression on the specified node (see the--evaloption). remote queen behavior ๐--vm-argsfile โ reads the command-line arguments from file and passes them to the Erlang VM.- the option is equivalent to Erlang's
-args_file.
- the option is equivalent to Erlang's
--dot-iexfile โ loads the specified file instead of.iex.exs(see the FILES section). ๐--remshnode โ connects to the specified node which was started with the--snameor--nameoptions (see above). ๐--โ separates the options passed to the compiler from the options passed to the executed code. the great divider, honestly ๐ง
๐ NOTES ๐
these following options can be given more than once: --boot-var, --erl-config, --eval, --rpc-eval. yeah she's flexible like that ๐
๐ ENVIRONMENT ๐
ELIXIR_ERL_OPTIONSโ allows passing parameters to the Erlang runtime. โจ
๐ง FILES ๐ง
~/.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โ afteriexstarts, it seeks the file.iex.exsand, 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. ๐ก
๐ SEE ALSO ๐
๐ AUTHOR ๐
Elixir is maintained by The Elixir Team.
This manual page was contributed by Evgeny Golyshev.
Copyright (c) 2012 Plataformatec.
Copyright (c) 2021 The Elixir Team.
๐ INTERNET RESOURCES ๐
- Main website:
https://elixir-lang.org - Documentation:
https://elixir-lang.org/docs.html
and that's the whole page bestie ๐ฅน this one shipped out from Debian and it's dated February 3, 2019 โ go read it in the wild, you're gonna slay ๐ โจ๐
๐ฆ where this page comes from
- alpine 3.24: elixir-doc 1.19.7-r0 ยท Apache-2.0
- arch rolling: elixir 1.20.4-1 ยท Apache-2.0
- fedora 43: elixir 1.19.6-2.fc43 ยท Apache-2.0
- fedora 44: elixir 1.19.5-4.fc44 ยท Apache-2.0
- fedora 44: elixir 1.19.6-2.fc44 ยท Apache-2.0
- nixos 26.05: elixir 1.20.5
- nixpkgs unstable: elixir 1.20.5
- ubuntu stonking: elixir 1.20.1.dfsg-2ubuntu2 ยท Apache-2.0
- ๐ the page's license: Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms