ELIXIR(1)

πŸ“¦
version 1.20.4 Β· 4 versions
, in alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’– 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-eval option too). ✨
  • -r file β€” requires the file you specified. like, at the very start of elixir it 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.
  • -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.
  • --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. Unless File contains an absolute path, the system goes looking for file.boot in the current directory and in $ROOT/bin. πŸ¦‹
    • Defaults to $ROOT/bin/start.boot.
    • This option is equivalent to Erlang's -boot.
  • --boot-var var dir β€” if the boot script has a path variable var that isn't $ROOT, that variable gets expanded to dir. 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,2 in SASL.
  • --erl parameters β€” serves the exact same purpose as ELIXIR_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.
  • --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.
  • --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 --hidden option lets you create a node that can be connected to another node while escaping those redundant connections. lowkey genius.
    • The function Node.list/0 gets 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/1 gets you a list containing only hidden nodes (the parameter :hidden) or both hidden and not-hidden nodes (the parameter :connected).
  • --logger-otp-reports val β€” turns OTP reporting on or off (val can be either true or false). 🌈
  • --logger-sasl-reports val β€” turns SASL reporting on or off (val can be either true or false). 🌈
  • --sname name β€” gives a node a short name and starts it. Short names look like name@host, where host is 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 like name@host, where host is 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 named pipedir and logdir (only for Unix-like operating systems). 🐧
  • --rpc-eval node expression β€” evaluates the expression you specified on the node you specified (see the --eval option). remote queen behavior. πŸ’…
  • --vm-args file β€” reads the command-line arguments out of file and hands them over to the Erlang VM.
    • This option is equivalent to Erlang's -args_file.
  • --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 --cookie option (see above). If that file isn't there when a node starts, it gets created. ✨

πŸ‘‘ SEE ALSO πŸ‘‘

elixirc(1), iex(1), mix(1)


πŸ’– 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 🌈


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 πŸ’œπŸ¦‹βœ¨