Packages

Command line tools to aid developers on daily work.

Current section

Files

Jump to
rit_cli lib rit_cli.ex
Raw

lib/rit_cli.ex

defmodule RitCLI do
@moduledoc false
alias RitCLI.{Main, Meta}
@spec main(list(Strict.t())) :: :ok | none
def main(argv) do
case Main.handle_arguments(Meta.create(argv)) do
:ok -> :ok
{:error, exit_code} -> exit({:shutdown, exit_code})
end
end
@spec parse_and_exec(String.t()) :: :ok | none
def parse_and_exec(input) do
input
|> String.split(" ")
|> main()
end
end