# lib/mix/tasks/mytask.ex defmodule Mix.Tasks.MyTask do use Mix.Task @shortdoc "A simple mix task" def run(_) do IO.puts "YO!" end end
Compile and run:
$ mix compile $ mix my_task "YO!"