View Source Nexus.CLI behaviour (nexus_cli v0.4.2)

Define callback that a CLI module needs to follow to be able to be runned and also define helper functions to parse a single command againts a raw input.

Summary

Types

Callbacks

@callback banner() :: String.t()
Link to this callback

handle_input(cmd)

View Source (optional)
@callback handle_input(cmd) :: :ok when cmd: atom()
Link to this callback

handle_input(cmd, args)

View Source (optional)
@callback handle_input(cmd, args) :: :ok when cmd: atom(), args: Nexus.Command.Input.t()
@callback version() :: String.t()

Functions

@spec build([binary()], module()) :: {:ok, t()} | {:error, atom()}