mix cli.embed (CLI Mate v0.8.1)

View Source

Copies the CLI code into your own application.

Synopsis

mix cli.embed [options] <prefix> <path>

Arguments

  • prefix - The root namespace for the generated modules. Example: MyApp.CLI.
  • path - The base directory for the generated modules. When the --extend option is not provided, the base module is definied as <path>.ex, that is outside of said directory.

Options

  • --extend - When true, the base CLI module will be defined as <prefix>.Base and will export an extend/0 macro. You will have to define your main CLI module and call require(<prefix>.Base).extend() from there.

    When false, the command will define the main CLI module as <prefix> directly. The extend/0 macro is still included. Defaults to false.

  • --moduledoc - When true, include @moduledoc attributes in the generated code. When false, defines @moduledoc false in all generated modules. Defaults to true.

  • -f, --force - Actually writes generated code to disk. Without this option the command only prints debug information. Defaults to false.

  • -y, --yes - Automatically accept prompts to overwrite files. Defaults to false.

  • --help - Displays this help.