Mix is Elixir’s project tool for creating, compiling, testing, and running multifile applications while managing dependencies and custom project tasks. It replaces ad hoc file handling with a small, conventional project structure. section 1.2.3 section 7.1
A practical Mix workflow includes:
- Create a project with mix new todo. section 7.1
- Compile it with mix compile and run its tests with mix test. section 7.1
- Place .ex files under lib, including nested folders, for automatic inclusion in the next build. section 7.1
- Use iex -S mix to compile the project and open an interactive shell with its modules available. section 7.1
- Run mix help or mix help command to inspect available tasks and task-specific guidance. section 7.1
Start a project
Run mix new todo, enter the todo directory, and use mix compile or mix test. For interactive experimentation, start iex -S mix and call the project’s modules from the shell. section 7.1
