ELIXIR(1)
π ELIXIR(1) β the Elixir script runner π
okay bestie, sit down, we're learning elixir (that's the manual page name too, general commands manual, iykyk) π¦
β¨ SYNOPSIS β¨
elixir [OPTIONS] file ...
πΈ DESCRIPTION πΈ
So basically elixir boots up the runtime system, usually so it can run one or more scripts for you. It's giving very much the same energy as iex(1)β¦ except the plot twist is that elixir dips out when the script it ran dips out. script over, node over, we're done here. periodt. π
π OPTIONS π
ngl, a LOT of these options got borrowed from the Erlang shell, so if you want extra lore, erl(1) is your additional source of information. π
-h,--helpβ shows the help message over on standard error (stderr) and then peaces out. bye! π«Ά-v,--versionβ prints the Elixir version to standard output (stdout) and exits. iconic.-e,--eval expressionβ evaluates the expression you handed over (peep the--rpc-evaloption too). β¨-r fileβ requires the file you specified. like, at the very start ofelixirit checks whether that file even exists. vibe check first, always. π-S scriptβ runs the script you specified. slay.-pa directoryβ adds the directory to the beginning of the code path. If that directory was already hanging out somewhere in there, it gets removed from its old position and plopped at the beginning. main character move honestly.- also see the function
Code.prepend_path/1.
- also see the function
-pr fileβ does the exact same thing as-r(scroll up bestie) but in parallel. multitasking queen.-pz directoryβ adds the directory to the end of the code path. If the directory already exists, it does NOT get removed from its old position, and it does NOT get put at the end. it's staying right where it is. π- also see the function
Code.append_path/1.
- also see the function
--app applicationβ starts the application you named, plus every single one of its dependencies. the whole entourage. π--boot fileβ names the boot file,file.boot, that gets used to start the system. UnlessFilecontains an absolute path, the system goes looking forfile.bootin the current directory and in$ROOT/bin. π¦- Defaults to
$ROOT/bin/start.boot. - This option is equivalent to Erlang's
-boot.
- Defaults to
--boot-var var dirβ if the boot script has a path variablevarthat isn't$ROOT, that variable gets expanded todir. Used when applications are installed in some other directory than$ROOT/lib. π- This option is equivalent to Erlang's
-boot_var. - Also see the function
:systools.make_script/1,2in SASL.
- This option is equivalent to Erlang's
--erl parametersβ serves the exact same purpose asELIXIR_ERL_OPTIONS(go look at the ENVIRONMENT section, it's right there). β¨--erl-config fileβ names a configuration file,file.config, used to configure applications. Heads up though: that configuration file has to be written in Erlang. no cap.- This option is equivalent to Erlang's
-config.
- This option is equivalent to Erlang's
--cookie valueβ sets the magic cookie value. If you don't pass the value via this option when the node starts, it gets pulled from the file~/.erlang.cookie(see FILES). Distributed nodes can only interact with each other when their magic cookies are equal. the way that cookies have to matchβ¦ π₯- Also see the function
Node.set_cookie/2.
- Also see the function
--hiddenβ starts a hidden node. π»- Connections between nodes are transitive. So like, 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
--hiddenoption lets you create a node that can be connected to another node while escaping those redundant connections. lowkey genius. - The function
Node.list/0gets you the list of nodes connected to the target node β but that list will NOT include hidden nodes. Depending on the input parameter,Node.list/1gets you a list containing only hidden nodes (the parameter:hidden) or both hidden and not-hidden nodes (the parameter:connected).
- Connections between nodes are transitive. So like, 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
--logger-otp-reports valβ turns OTP reporting on or off (valcan be eithertrueorfalse). π--logger-sasl-reports valβ turns SASL reporting on or off (valcan be eithertrueorfalse). π--sname nameβ gives a node a short name and starts it. Short names look likename@host, wherehostis the name of the target host (hostname(1)) running the node. Nodes with short names can only interact with each other inside the same local network. π--name nameβ gives a node a long name and starts it. Long names look likename@host, wherehostis the IP address of the host running the node. Unlike those short-name nodes, long-name nodes aren't boxed in by local network boundaries (see above). π--pipe-to pipedir logdirβ starts the Erlang VM as a namedpipedirandlogdir(only for Unix-like operating systems). π§--rpc-eval node expressionβ evaluates the expression you specified on the node you specified (see the--evaloption). remote queen behavior. π--vm-args fileβ reads the command-line arguments out offileand hands them over to the Erlang VM.- This option is equivalent to Erlang's
-args_file.
- This option is equivalent to Erlang's
--no-haltβ does NOT halt the Erlang VM after execution. she lives on. πβ¨--β separates the options passed to the compiler from the options passed to the executed code. the great divider.
π NOTES π
These options can be given more than once, bestie: --boot-var, --erl-config, --eval, --rpc-eval. stack 'em up. π§
πΏ ENVIRONMENT πΏ
ELIXIR_ERL_OPTIONSβ lets you pass parameters over to the Erlang runtime. π
π FILES π
~/.erlang.cookieβ stores the magic cookie value, and it's only used when you didn't specify one via the--cookieoption (see above). If that file isn't there when a node starts, it gets created. β¨
π 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 - Package manager:
https://hex.pm
okay that's the whole page, you ate that fr fr π this one ships out from Debian and it's dated February 3, 2019 β go run some scripts bestie, ily ππ¦β¨
π¦ 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