Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022

mix (1)


mix - The software project management tool


mix [TASK] [project_name]
elixir [OPTIONS] -S mix [TASK] [project_name]


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

     mix -- The software project management tool

     mix [TASK] [project_name]
     elixir [OPTIONS] -S mix [TASK] [project_name]

     mix is intended for both organizing code into projects and their mainte-
     nance. For the latter the tool offers some advanced features like depen-
     dency management, packaging, preparing documentation, testing and so on.

     Have a look at the SYNOPSIS section and the second way of running mix it
     offers. The point is that the tool is none other than the Elixir script,
     therefore it can be invoked via elixir(1) in the same way as any other
     script. It's useful when you want to run mix with particular options.

     All the mix functionality is represented by a set of tasks. A task is a
     piece of code written in Elixir and intended for solving a particular
     problem. Like programs, many tasks accept input parameters and/or support
     options which slightly modify their behaviour, but others do not. There
     are two types of tasks: those that are available after installation this
     or that archive (local tasks) and those that are offered by mix (built-in
     tasks).  The run task will be executed by default if none other has been

     In spite of the fact that the greater part of mix is tasks, the man page
     doesn't contain the help information related to each of them because mix
     is self-descriptive. Thus, using the help task, you can get both the full
     list of local/built-in tasks and the information related to a particular

     An archive, in terms of Erlang/OTP, is the ZIP file with the .ez exten-
     sion which contains a precompiled OTP application with all its dependen-

     An application is an entity that helps to combine sets of components into
     a single unit to simplify their reusing in other systems[2].

             Allows specifying the directory into which the archives should be
             installed (see mix help archive.install).  The ~/.mix/archives
             directory is used for this purpose by default.

             When set, outputs debug information about each task before run-
             ning it.

             Allows specifying which environment should be used. The dev envi-
             ronment is used by default if none other has been specified.

             Sometimes you have to use a particular set of configuration
             parameter values or perform particular steps when you compile or
             run a project (or in some other cases).  The mix environments
             allow grouping values of configuration parameters and steps to
             switch between them by specifying the necessary environment via

             Allows specifying which target should be used. The host target is
             used by default if none other has been specified.

             Allows changing the full path to the mix.exs file (see FILES
             section).  The most obvious use case is to have more than one
             copy of mix.exs in a project, but it's worth noting that MIX_EXS
             should be used only if the mix environments (see above) are not
             enough to solve the problem.

             path to Mix's home directory, stores configuration files and
             scripts used by Mix

             Specifies directory where Mix.install/2 keeps installs cache

             Allows expanding the code path. If the MIX_PATH environment vari-
             able has a value which consists of multiple paths, they must be
             colon-separated (for Unix-like operating systems) or semicolon-
             separated (for Windows).

             As mentioned above, there are two types of tasks: local and
             built-in. These tasks are always visible for mix because the
             directories, in which they are located, are a part of code path.
             If a task belongs to neither the one type nor the other, MIX_PATH
             helps you say to mix where it should search the task.

             When set, does not print information messages to the terminal.

             Contains the most significant information related to the project,
             such as its name, version, list of dependencies and so on. As a
             rule, the file is named mix.exs and located at the top of the
             project's source tree, but you can change the full path to it
             using the MIX_EXS environment variable (see the ENVIRONMENT

             Allows locking down the project dependencies with a proper ver-
             sion range before performing any updates. It is useful when you
             know that your project is incompatible with newer versions of
             certain dependencies. The file is located at the top of the
             project's source tree as well as mix.exs (see above).

     [1] https://erlang.org/doc/man/code.html#id103620

     [2] https://erlang.org/doc/design_principles/applications.html

     See attributes(7) for descriptions of the following attributes:

     |Availability   | runtime/elixir        |
     |Stability      | Pass-through volatile |

     elixir(1), elixirc(1), iex(1)

     Elixir is maintained by the Elixir Core Team.

     This manual page was contributed by Evgeny Golyshev.

     Copyright (c) 2012 Plataformatec.

     Main website: https://elixir-lang.org

     Documentation: https://elixir-lang.org/docs.html

     Source code for open source software components in Oracle Solaris can be
     found at https://www.oracle.com/downloads/opensource/solaris-source-code-

     This software was built from source available at https://github.com/ora-
     cle/solaris-userland.  The original community source was downloaded from

     Further information about this software can be found on the open source
     community website at https://elixir-lang.org/.

BSD                              May 27, 2015                              BSD