View Source MyCLI (nexus_cli v0.5.0)

MyCLI provides file operations such as copy, move, and delete using the Nexus.CLI DSL.

Summary

Functions

Prints CLI documentation based into the CLI spec defined given a command path

Given the system argv, tries to parse the input and dispatches the parsed command to the handler module (aka Elixir.MyCLI)

Functions

Link to this function

display_help(path \\ [])

View Source

Prints CLI documentation based into the CLI spec defined given a command path

For more information, check Nexus.CLI.Help

It receives an optional command path, for displaying subcommands help, for example

Examples

iex> MyCLI.display_help()
# prints help for the CLI itself showing all available commands and flags
:ok

iex> MyCLI.display_help([:root])
# prints help for the `root` cmd showing all available subcommands and flags
:ok

iex> MyCLI.display_help([:root, :nested])
# prints help for the `root -> :nested` subcmd showing all available subcommands and flags
:ok

Given the system argv, tries to parse the input and dispatches the parsed command to the handler module (aka Elixir.MyCLI)

If it fails it will display the CLI help. This convenience function can be used as delegated of an Escript or Mix.Task module

For more information chekc Nexus.CLI.__run_cli__/2