1MIX(1) BSD General Commands Manual MIX(1)
2
4 mix — The software project management tool
5
7 mix [TASK] [project_name]
8 elixir [OPTIONS] -S mix [TASK] [project_name]
9
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
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
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 MIX_QUIET
94 When set, does not print information messages to the terminal.
95
97 mix.exs
98 Contains the most significant information related to the project,
99 such as its name, version, list of dependencies and so on. As a
100 rule, the file is named mix.exs and located at the top of the
101 project's source tree, but you can change the full path to it
102 using the MIX_EXS environment variable (see the ENVIRONMENT
103 section).
104
105 mix.lock
106 Allows locking down the project dependencies with a proper ver‐
107 sion range before performing any updates. It is useful when you
108 know that your project is incompatible with newer versions of
109 certain dependencies. The file is located at the top of the
110 project's source tree as well as mix.exs (see above).
111
113 [1] http://www.erlang.org/doc/man/code.html#id103620
114
115 [2] http://www.erlang.org/doc/design_principles/applications.html
116
118 elixir(1), elixirc(1), iex(1)
119
121 Elixir is maintained by the Elixir Core Team.
122
123 This manual page was contributed by Evgeny Golyshev.
124
125 Copyright (c) 2012 Plataformatec.
126
128 Main website: https://elixir-lang.org
129
130 Documentation: https://elixir-lang.org/docs.html
131
132BSD May 27, 2015 BSD