1MIX(1)                    BSD General Commands Manual                   MIX(1)
2

NAME

4     mix — The software project management tool
5

SYNOPSIS

7     mix [TASK] [project_name]
8     elixir [OPTIONS] -S mix [TASK] [project_name]
9

DESCRIPTION

11     mix is intended for both organizing code into projects and their mainte‐
12     nance. For the latter the tool offers some advanced features like depen‐
13     dency management, packaging, preparing documentation, testing and so on.
14
15     Have a look at the SYNOPSIS section and the second way of running mix it
16     offers. The point is that the tool is none other than the Elixir script,
17     therefore it can be invoked via elixir(1) in the same way as any other
18     script. It's useful when you want to run mix with particular options.
19

DEFINITIONS

21     All the mix functionality is represented by a set of tasks. A task is a
22     piece of code written in Elixir and intended for solving a particular
23     problem. Like programs, many tasks accept input parameters and/or support
24     options which slightly modify their behaviour, but others do not. There
25     are two types of tasks: those that are available after installation this
26     or that archive (local tasks) and those that are offered by mix (built-in
27     tasks).  The run task will be executed by default if none other has been
28     specified.
29
30     In spite of the fact that the greater part of mix is tasks, the man page
31     doesn't contain the help information related to each of them because mix
32     is self-descriptive. Thus, using the help task, you can get both the full
33     list of local/built-in tasks and the information related to a particular
34     task.
35
36     An archive, in terms of Erlang/OTP, is the ZIP file with the .ez exten‐
37     sion which contains a precompiled OTP application with all its dependen‐
38     cies[1].
39
40     An application is an entity that helps to combine sets of components into
41     a single unit to simplify their reusing in other systems[2].
42

ENVIRONMENT

44     MIX_ARCHIVES
45             Allows specifying the directory into which the archives should be
46             installed (see mix help archive.install).  The ~/.mix/archives
47             directory is used for this purpose by default.
48
49     MIX_DEBUG
50             When set, outputs debug information about each task before run‐
51             ning it.
52
53     MIX_ENV
54             Allows specifying which environment should be used. The dev envi‐
55             ronment is used by default if none other has been specified.
56
57             Sometimes you have to use a particular set of configuration pa‐
58             rameter values or perform particular steps when you compile or
59             run a project (or in some other cases).  The mix environments al‐
60             low grouping values of configuration parameters and steps to
61             switch between them by specifying the necessary environment via
62             MIX_ENV.
63
64     MIX_TARGET
65             Allows specifying which target should be used. The host target is
66             used by default if none other has been specified.
67
68     MIX_EXS
69             Allows changing the full path to the mix.exs file (see FILES
70             section).  The most obvious use case is to have more than one
71             copy of mix.exs in a project, but it's worth noting that MIX_EXS
72             should be used only if the mix environments (see above) are not
73             enough to solve the problem.
74
75     MIX_HOME
76             path to Mix's home directory, stores configuration files and
77             scripts used by Mix
78
79     MIX_INSTALL_DIR
80             Specifies directory where Mix.install/2 keeps installs cache
81
82     MIX_INSTALL_FORCE
83             Runs Mix.install/2 with empty install cache
84
85     MIX_PATH
86             Allows expanding the code path. If the MIX_PATH environment vari‐
87             able has a value which consists of multiple paths, they must be
88             colon-separated (for Unix-like operating systems) or semicolon-
89             separated (for Windows).
90
91             As mentioned above, there are two types of tasks: local and
92             built-in. These tasks are always visible for mix because the di‐
93             rectories, in which they are located, are a part of code path. If
94             a task belongs to neither the one type nor the other, MIX_PATH
95             helps you say to mix where it should search the task.
96
97     MIX_QUIET
98             When set, does not print information messages to the terminal.
99

FILES

101     mix.exs
102             Contains the most significant information related to the project,
103             such as its name, version, list of dependencies and so on. As a
104             rule, the file is named mix.exs and located at the top of the
105             project's source tree, but you can change the full path to it us‐
106             ing the MIX_EXS environment variable (see the ENVIRONMENT
107             section).
108
109     mix.lock
110             Allows locking down the project dependencies with a proper ver‐
111             sion range before performing any updates. It is useful when you
112             know that your project is incompatible with newer versions of
113             certain dependencies. The file is located at the top of the
114             project's source tree as well as mix.exs (see above).
115

REFERENCES

117     [1] https://www.erlang.org/doc/man/code.html#id103620
118
119     [2] https://www.erlang.org/doc/design_principles/applications.html
120

SEE ALSO

122     elixir(1), elixirc(1), iex(1)
123

AUTHOR

125     Elixir is maintained by The Elixir Team.
126
127     This manual page was contributed by Evgeny Golyshev.
128
129     Copyright (c) 2012 Plataformatec.
130
131     Copyright (c) 2021 The Elixir Team.
132

INTERNET RESOURCES

134     Main website: https://elixir-lang.org
135
136     Documentation: https://elixir-lang.org/docs.html
137
138BSD                              May 27, 2015                              BSD
Impressum