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
58             parameter values or perform particular steps when you compile or
59             run a project (or in some other cases).  The mix environments
60             allow 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             Stores configuration files and scripts shared by multiple mix
77             implementations.
78
79             See the Mix.Utils.mix_home/0 function.
80
81     MIX_PATH
82             Allows expanding the code path. If the MIX_PATH environment vari‐
83             able has a value which consists of multiple paths, they must be
84             colon-separated (for Unix-like operating systems) or semicolon-
85             separated (for Windows).
86
87             As mentioned above, there are two types of tasks: local and
88             built-in. These tasks are always visible for mix because the
89             directories, in which they are located, are a part of code path.
90             If a task belongs to neither the one type nor the other, MIX_PATH
91             helps you say to mix where it should search the task.
92
93             Use the :code.get_path/0 function to get the list of paths which
94             are a part of the code path by default and the
95             Mix.Utils.mix_paths/0 function to get the list of paths specified
96             in the MIX_PATH value.
97
98     MIX_QUIET
99             When set, does not print information messages to the terminal.
100

FILES

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

REFERENCES

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

SEE ALSO

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

AUTHOR

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

INTERNET RESOURCES

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