Packages

Command line project generator with tux dependency. Provides a `mix tux.new` task to bootstrap a new command line Elixir project with tux dependency and a default skeleton.

Current section

Files

Jump to
tux_new priv templates cli hello.ex
Raw

priv/templates/cli/hello.ex

defmodule <%= @main_module %>.Cli.Hello do
use Tux.Command
@impl true
def about(), do: "Greet current user"
@impl true
def main(env, _args) do
{:ok, "Hello, #{env.pre.user}"}
end
@impl true
def help() do
Help.new()
|> Help.about(about())
|> Help.ok()
end
end