jaspermayone / greenhouse

0 stars 0 forks source link

Remove deprecated form. #178

Closed github-actions[bot] closed 5 months ago

github-actions[bot] commented 5 months ago

source://claide//lib/claide/command.rb#663

Plugins are loaded via their `\<plugin_prefix>_plugin.rb` file.

Defaults to search for `claide` plugins.

source://claide//lib/claide/command.rb#87

@param value the value to set the attribute plugin_prefixes to.

source://claide//lib/claide/command.rb#90

this method.

@param exception [Exception] An exception that occurred while running a command through

{Command.run}.

@raise By default re-raises the specified exception.

@return [void]

source://claide//lib/claide/command.rb#414

source://claide//lib/claide/command.rb#177

{Command.parse}, validates it through {Command#validate!}, and runs it

through {Command#run}.

@note The ANSI support is configured before running a command to allow

the same process to run multiple commands with different

settings. For example a process with ANSI output enabled might

want to programmatically invoke another command with the output

enabled.

@param argv [Array, ARGV] A list of parameters. For instance, the standard `ARGV` constant,

which contains the parameters passed to the program.

@return [void]

source://claide//lib/claide/command.rb#324

under this command.

source://claide//lib/claide/command.rb#184

this command _or_ the subcommands of those command classes in

case the command class should be ignored in command lookup.

source://claide//lib/claide/command.rb#192

next to the command in the help banner of a parent command.

source://claide//lib/claide/command.rb#75

next to the command in the help banner of a parent command.

source://claide//lib/claide/command.rb#75

by the `--version` flag if used for the root command.

source://claide//lib/claide/command.rb#149

by the `--version` flag if used for the root command.

source://claide//lib/claide/command.rb#149

This method can be used in conjunction with overriding `options`.

@example

option '--help', 'Print help banner '

@return [void]

source://claide//lib/claide/command.rb#269

@param command_class [Class] The class of the command which encountered the unrecognized

arguments.

@return [ArgumentSuggester] a new instance of ArgumentSuggester

source://claide//lib/claide/command/argument_suggester.rb#13

according to the type of the argument.

source://claide//lib/claide/command/argument_suggester.rb#21

on the `levenshtein_distance` score.

source://claide//lib/claide/command/argument_suggester.rb#33

suggestion.

source://claide//lib/claide/command/argument_suggester.rb#42

From: http://rosettacode\.org/wiki/Levenshtein\_distance\#Ruby

@param a [String] The first string to compare.

@param b [String] The second string to compare.

@return [Fixnum] The distance between the strings.

source://claide//lib/claide/command/argument_suggester.rb#84

@param suggestion [String] The suggestion to prettify.

@param argument_type [Type] The type of the suggestion: either `:command` or `:option`.

@return [String] A handsome suggestion.

source://claide//lib/claide/command/argument_suggester.rb#64

class.

source://claide//lib/claide/command/banner.rb#8

@return [Banner] a new instance of Banner

source://claide//lib/claide/command/banner.rb#15

source://claide//lib/claide/command/banner.rb#11

source://claide//lib/claide/command/banner.rb#11

source://claide//lib/claide/command/banner.rb#21

largest option name. Used to align all the descriptions.

source://claide//lib/claide/command/banner.rb#203

option).

source://claide//lib/claide/command/banner.rb#124

source://claide//lib/claide/command/banner.rb#113

the command. The square brackets conveys a sense of direction

and indicates the gravitational force towards the default

command.

@return [String] The section describing the subcommands of the command.

source://claide//lib/claide/command/banner.rb#100

source://claide//lib/claide/command/banner.rb#56

source://claide//lib/claide/command/banner.rb#175

source://claide//lib/claide/command/banner.rb#155

source://claide//lib/claide/command/banner.rb#161

name.

source://claide//lib/claide/command/banner.rb#148

source://claide//lib/claide/command/banner.rb#141

source://claide//lib/claide/command/banner.rb#67

source://claide//lib/claide/command/banner.rb#85

source://claide//lib/claide/command/banner.rb#78

banner.

source://claide//lib/claide/command/banner.rb#194

source://claide//lib/claide/command/banner.rb#48

source://claide//lib/claide/command/banner.rb#44

source://claide//lib/claide/command/banner.rb#52

source://claide//lib/claide/command/banner.rb#40

source://claide//lib/claide/command/banner.rb#275

source://claide//lib/claide/command/banner.rb#288

source://claide//lib/claide/command/banner.rb#269

@param indent [Fixnum] The number of spaces to insert before the string.

@param max_width [Fixnum] The maximum width to use to format the string if the terminal

is too wide.

@return [String] Wraps a formatted string (e.g. markdown) by stripping

heredoc indentation and wrapping by word to the terminal width

taking into account a maximum one, and indenting the string.

Code lines (i.e. indented by four spaces) are not wrapped.

source://claide//lib/claide/command/banner.rb#228

@param indent [Fixnum] The number of spaces to insert before the string.

@param max_width [Fixnum] The maximum width to use to format the string if the terminal

is too wide.

@return [String] Wraps a string to the terminal width taking into

account the given indentation.

source://claide//lib/claide/command/banner.rb#254

Plugins are loaded the first time a command run and are identified by the

prefix specified in the command class. Plugins must adopt the following

conventions:

- Support being loaded by a file located under the

`lib/#{plugin_prefix}_plugin` relative path.

- Be stored in a folder named after the plugin.

source://claide//lib/claide/command/plugin_manager.rb#15

installed plugins that match the given `plugin_prefix`.

source://claide//lib/claide/command/plugin_manager.rb#45

for files named after the `PLUGIN_PREFIX_plugin` and returns the

specifications of the gems loaded successfully.

Plugins are required safely.

source://claide//lib/claide/command/plugin_manager.rb#28

grouped by plugin prefix.

source://claide//lib/claide/command/plugin_manager.rb#19

plugin files to require for a given plugin prefix.

source://claide//lib/claide/command/plugin_manager.rb#72

@return [Array\<String>] The list of the plugins whose root path appears

in the backtrace of an exception.

source://claide//lib/claide/command/plugin_manager.rb#56

If any exception occurs it is caught and an

informative message is printed.

@param paths [String] The paths to require.

@return [Bool] Whether requiring succeeded.

source://claide//lib/claide/command/plugin_manager.rb#89

loaded plugins.

source://claide//lib/claide/command/plugin_manager.rb#38

shown while running {Command.run}.

source://claide//lib/claide/help.rb#9

terminate the program with, will be set to `1`, otherwise a {Help}

exception is treated as not being a real error and exits with `0`.

@param banner [String] @see banner

@param error_message [String] @see error_message

@return [Help] a new instance of Help

source://claide//lib/claide/help.rb#29

@return [String] The banner containing the usage instructions of the

source://claide//lib/claide/help.rb#15

help banner.

source://claide//lib/claide/help.rb#20

{Command.ansi_output} is set to `true`.

source://claide//lib/claide/help.rb#38

banner of the command.

source://claide//lib/claide/help.rb#54

source://claide//lib/claide/help.rb#47

while running {Command.run}, only the message of the exception will be

shown to the user. Unless disabled with the `--verbose` flag.

In addition, the message will be colored red, if {Command.ansi_output}

is set to `true`.

source://claide//lib/claide/informative_error.rb#11

the program with. Defaults to `1`.

source://claide//lib/claide/informative_error.rb#15

"example".ansi.yellow #\=> "\e[33mexample\e[39m"

"example".ansi.on_red #\=> "\e[41mexample\e[49m"

"example".ansi.bold #\=> "\e[1mexample\e[21m"

@return [StringEscaper] An object which provides convenience methods to

wrap the receiver in ANSI sequences.

source://claide//lib/claide/ansi.rb#123

https://github.com/jaspermayone/greenhouse/blob/b44c6478e928fdd5ada0bd950c7340818b6e64fb/sorbet/rbi/gems/claide@1.1.0.rbi#L1040


# typed: true

# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `claide` gem.
# Please instead update this file by running `bin/tapioca gem claide`.

# The mods of interest are {CLAide::ARGV}, {CLAide::Command}, and
# {CLAide::InformativeError}
#
# source://claide//lib/claide.rb#6
module CLAide; end

# Provides support for ANSI Escape sequences
#
# For more information see:
#
# - http://ascii-table.com/ansi-escape-sequences.php
# - http://en.wikipedia.org/wiki/ANSI_escape_code
#
# This functionality has been inspired and derived from the following gems:
#
# - colored
# - colorize
#
# source://claide//lib/claide/ansi/cursor.rb#4
class CLAide::ANSI
  extend ::CLAide::ANSI::Cursor
  extend ::CLAide::ANSI::Graphics

  class << self
    # @param key [Symbol] The key for which the code is needed.
    # @param map [Hash{Symbol => Fixnum}] A hash which associates each code to each key.
    # @raise If the key is not provided.
    # @raise If the key is not present in the map.
    # @return [Fixnum] The code of a key given the map.
    #
    # source://claide//lib/claide/ansi.rb#96
    def code_for_key(key, map); end

    # original string. This method is intended to offer a central location
    # where to disable ANSI logic without needed to implement conditionals
    # across the code base of clients.
    #
    # @example
    #
    #   "example".ansi.yellow #=> "\e[33mexample\e[39m"
    #   ANSI.disabled = true
    #   "example".ansi.yellow #=> "example"
    # @return [Bool] Wether the string mixin should be disabled to return the
    #
    # source://claide//lib/claide/ansi.rb#35
    def disabled; end

    # original string. This method is intended to offer a central location
    # where to disable ANSI logic without needed to implement conditionals
    # across the code base of clients.
    #
    # @example
    #
    #   "example".ansi.yellow #=> "\e[33mexample\e[39m"
    #   ANSI.disabled = true
    #   "example".ansi.yellow #=> "example"
    # @return [Bool] Wether the string mixin should be disabled to return the
    #
    # source://claide//lib/claide/ansi.rb#35
    def disabled=(_arg0); end
  end
end

# @return [Hash{Symbol => Fixnum}] The colors codes by their English name.
#
# source://claide//lib/claide/ansi.rb#66
CLAide::ANSI::COLORS = T.let(T.unsafe(nil), Hash)

# Provides support for generating escape sequences relative to the position
# of the cursor and to erase parts of text.
#
# source://claide//lib/claide/ansi/cursor.rb#8
module CLAide::ANSI::Cursor
  class << self
    # @return [String] The escape sequence to erase the display.
    #
    # source://claide//lib/claide/ansi/cursor.rb#57
    def erase_display; end

    # @return [String] The escape sequence to erase a line form the
    #   cursor position to then end.
    #
    # source://claide//lib/claide/ansi/cursor.rb#64
    def erase_line; end

    # @param lines [Fixnum] The amount of lines the cursor should be moved to.
    #   Negative values indicate up direction and positive ones
    #   down direction.
    # @param columns [Fixnum] The amount of columns the cursor should be moved to.
    #   Negative values indicate left direction and positive ones
    #   right direction.
    # @return [String] The escape sequence to set the cursor at the
    #   given line.
    #
    # source://claide//lib/claide/ansi/cursor.rb#35
    def move_cursor(lines, columns = T.unsafe(nil)); end

    # @return [String] The escape sequence to restore the cursor to the
    #   previously saved position. This sequence also clears all the
    #   output after the position.
    #
    # source://claide//lib/claide/ansi/cursor.rb#51
    def restore_cursor_position; end

    # @return [String] The escape sequence to save the cursor position.
    #
    # source://claide//lib/claide/ansi/cursor.rb#43
    def save_cursor_position; end

    # @param line [Fixnum] The line where to place the cursor.
    # @param column [Fixnum] The column where to place the cursor.
    # @return [String] The escape sequence to set the cursor at the
    #   given line.
    #
    # source://claide//lib/claide/ansi/cursor.rb#18
    def set_cursor_position(line = T.unsafe(nil), column = T.unsafe(nil)); end
  end
end

# Return [String] The escape sequence for the default background color.
#
# source://claide//lib/claide/ansi.rb#83
CLAide::ANSI::DEFAULT_BACKGROUND_COLOR = T.let(T.unsafe(nil), String)

# Return [String] The escape sequence for the default foreground color.
#
# source://claide//lib/claide/ansi.rb#79
CLAide::ANSI::DEFAULT_FOREGROUND_COLOR = T.let(T.unsafe(nil), String)

# Provides support for generating escape sequences relative to the graphic
# mode.
#
# source://claide//lib/claide/ansi/graphics.rb#8
module CLAide::ANSI::Graphics
  class << self
    # @param key [Symbol] The name of the color.
    # @return [String] The escape sequence for a background color.
    #
    # source://claide//lib/claide/ansi/graphics.rb#34
    def background_color(key); end

    # @param color [Fixnum] The value of the color.
    # @return [String] The escape sequence for a background color using the
    #   xterm-256 format.
    #
    # source://claide//lib/claide/ansi/graphics.rb#56
    def background_color_256(color); end

    # @param key [Symbol] The name of the color.
    # @return [String] The escape sequence for a foreground color.
    #
    # source://claide//lib/claide/ansi/graphics.rb#24
    def foreground_color(key); end

    # @param color [Fixnum] The value of the color.
    # @return [String] The escape sequence for a foreground color using the
    #   xterm-256 format.
    #
    # source://claide//lib/claide/ansi/graphics.rb#45
    def foreground_color_256(color); end

    # @param codes [Fixnum, Array<Fixnum>] The code(s).
    # @return [String] The escape sequence for a single or a list of codes.
    #
    # source://claide//lib/claide/ansi/graphics.rb#66
    def graphics_mode(codes); end

    # @param key [Symbol] The name of the text attribute.
    # @return [String] The escape sequence for a text attribute.
    #
    # source://claide//lib/claide/ansi/graphics.rb#14
    def text_attribute(key); end
  end
end

# Return [String] The escape sequence to reset the graphics.
#
# source://claide//lib/claide/ansi.rb#62
CLAide::ANSI::RESET_SEQUENCE = T.let(T.unsafe(nil), String)

# Provides support to wrap strings in ANSI sequences according to the
# `ANSI.disabled` setting.
#
# source://claide//lib/claide/ansi/string_escaper.rb#6
class CLAide::ANSI::StringEscaper < ::String
  # @param string [String] The string to wrap.
  # @return [StringEscaper] a new instance of StringEscaper
  #
  # source://claide//lib/claide/ansi/string_escaper.rb#9
  def initialize(string); end

  # @param keys [Array<Symbol>] One or more keys corresponding to ANSI codes to apply to the
  #   string.
  # @return [StringEscaper]
  #
  # source://claide//lib/claide/ansi/string_escaper.rb#33
  def apply(*keys); end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def black; end

  # source://claide//lib/claide/ansi/string_escaper.rb#70
  def blink; end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def blue; end

  # source://claide//lib/claide/ansi/string_escaper.rb#70
  def bold; end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def cyan; end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def green; end

  # source://claide//lib/claide/ansi/string_escaper.rb#70
  def hidden; end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def magenta; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_black; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_blue; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_cyan; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_green; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_magenta; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_red; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_white; end

  # source://claide//lib/claide/ansi/string_escaper.rb#57
  def on_yellow; end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def red; end

  # source://claide//lib/claide/ansi/string_escaper.rb#70
  def reverse; end

  # source://claide//lib/claide/ansi/string_escaper.rb#70
  def underline; end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def white; end

  # @return [StringEscaper] Wraps a string in the given ANSI sequences,
  #   taking care of handling existing sequences for the same
  #   family of attributes (i.e. attributes terminated by the
  #   same sequence).
  #
  # source://claide//lib/claide/ansi/string_escaper.rb#18
  def wrap_in_ansi_sequence(open, close); end

  # source://claide//lib/claide/ansi/string_escaper.rb#46
  def yellow; end
end

# @return [Hash{Symbol => Fixnum}] The text attributes codes by their
#   English name.
#
# source://claide//lib/claide/ansi.rb#41
CLAide::ANSI::TEXT_ATTRIBUTES = T.let(T.unsafe(nil), Hash)

# @return [Hash{Symbol => Fixnum}] The codes to disable a text attribute by
#   their name.
#
# source://claide//lib/claide/ansi.rb#52
CLAide::ANSI::TEXT_DISABLE_ATTRIBUTES = T.let(T.unsafe(nil), Hash)

# This class is responsible for parsing the parameters specified by the user,
# accessing individual parameters, and keep state by removing handled
# parameters.
#
# source://claide//lib/claide/argv.rb#8
class CLAide::ARGV
  # @param argv [Array<#to_s>] A list of parameters.
  # @return [ARGV] a new instance of ARGV
  #
  # source://claide//lib/claide/argv.rb#25
  def initialize(argv); end

  # @example
  #
  #   argv = CLAide::ARGV.new(['--ignore=foo', '--ignore=bar'])
  #   argv.all_options('include')  # => []
  #   argv.all_options('ignore')   # => ['bar', 'foo']
  #   argv.remainder               # => []
  # @note This will remove the option from the remaining parameters.
  # @param name [String] The name of the option to look for among the remaining
  #   parameters.
  # @return [Array<String>] Returns an array of all the values of the option
  #   with the specified `name` among the remaining
  #   parameters.
  #
  # source://claide//lib/claide/argv.rb#204
  def all_options(name); end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', 'white', '--no-milk', 'biscuit'])
  #   argv.shift_argument # => 'tea'
  #   argv.arguments      # => ['white', 'biscuit']
  # @return [Array<String>] A list of the remaining arguments.
  #
  # source://claide//lib/claide/argv.rb#96
  def arguments; end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', 'white', '--no-milk', 'biscuit'])
  #   argv.arguments  # => ['tea', 'white', 'biscuit']
  #   argv.arguments! # => ['tea', 'white', 'biscuit']
  #   argv.arguments  # => []
  # @note This version also removes the arguments from the remaining
  #   parameters.
  # @return [Array<String>] A list of the remaining arguments.
  #
  # source://claide//lib/claide/argv.rb#112
  def arguments!; end

  # @return [Boolean] Whether or not there are any remaining unhandled
  #   parameters.
  #
  # source://claide//lib/claide/argv.rb#32
  def empty?; end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', '--no-milk', '--sweetener=honey'])
  #   argv.flag?('milk')       # => false
  #   argv.flag?('milk')       # => nil
  #   argv.flag?('milk', true) # => true
  #   argv.remainder           # => ['tea', '--sweetener=honey']
  # @note This will remove the flag from the remaining parameters.
  # @param name [String] The name of the flag to look for among the remaining parameters.
  # @param default [Boolean] The value that is returned in case the flag is not among the
  #   remaining parameters.
  # @return [Boolean, nil] Returns `true` if the flag by the specified `name`
  #   is among the remaining parameters and is not negated.
  #
  # source://claide//lib/claide/argv.rb#158
  def flag?(name, default = T.unsafe(nil)); end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', '--no-milk', '--sweetener=honey'])
  #   argv.option('sweetener')          # => 'honey'
  #   argv.option('sweetener')          # => nil
  #   argv.option('sweetener', 'sugar') # => 'sugar'
  #   argv.remainder                   # => ['tea', '--no-milk']
  # @note This will remove the option from the remaining parameters.
  # @param name [String] The name of the option to look for among the remaining
  #   parameters.
  # @param default [String] The value that is returned in case the option is not among the
  #   remaining parameters.
  # @return [String, nil] Returns the value of the option by the specified
  #   `name` is among the remaining parameters.
  #
  # source://claide//lib/claide/argv.rb#183
  def option(name, default = T.unsafe(nil)); end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', '--no-milk', '--sweetener=honey'])
  #   argv.options # => { 'milk' => false, 'sweetener' => 'honey' }
  # @return [Hash] A hash that consists of the remaining flags and options
  #   and their values.
  #
  # source://claide//lib/claide/argv.rb#80
  def options; end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', '--no-milk', '--sweetener=honey'])
  #   argv.shift_argument # => 'tea'
  #   argv.remainder      # => ['--no-milk', '--sweetener=honey']
  # @return [Array<String>] A list of the remaining unhandled parameters, in
  #   the same format a user specifies it in.
  #
  # source://claide//lib/claide/argv.rb#45
  def remainder; end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', '--no-milk', '--sweetener=honey'])
  #   argv.shift_argument # => 'tea'
  #   argv.remainder!     # => ['--no-milk', '--sweetener=honey']
  #   argv.remainder      # => []
  # @return [Array<String>] A list of the remaining unhandled parameters, in
  #   the same format the user specified them.
  #
  # source://claide//lib/claide/argv.rb#68
  def remainder!; end

  # @example
  #
  #   argv = CLAide::ARGV.new(['tea', 'white'])
  #   argv.shift_argument # => 'tea'
  #   argv.arguments      # => ['white']
  # @note This will remove the argument from the remaining parameters.
  # @return [String] The first argument in the remaining parameters.
  #
  # source://claide//lib/claide/argv.rb#130
  def shift_argument; end

  private

  # @param requested_type [Symbol] The type of the entry.
  # @param requested_key [String] The key of the entry.
  # @param default [Bool, String, Nil] The value which should be returned if the entry is not present.
  # @param delete_all [Bool] Whether all values matching `requested_type` and `requested_key`
  #   should be deleted.
  # @return [Bool, String, Nil] Removes an entry from the entries list and
  #   returns its value or the default value if the entry was not
  #   present.
  #
  # source://claide//lib/claide/argv.rb#237
  def delete_entry(requested_type, requested_key, default, delete_all = T.unsafe(nil)); end

  # @return [Array<Array<Symbol, String, Array>>] A list of tuples for each
  #   non consumed parameter, where the first entry is the `type` and
  #   the second entry the actual parsed parameter.
  #
  # source://claide//lib/claide/argv.rb#218
  def entries; end

  class << self
    # @param argv [Object] The object which should be converted to the ARGV class.
    # @return [ARGV] Coerces an object to the ARGV class if needed.
    #
    # source://claide//lib/claide/argv.rb#14
    def coerce(argv); end
  end
end

# source://claide//lib/claide/argv.rb#247
module CLAide::ARGV::Parser
  class << self
    # @param argument [String] The argument to check.
    # @return [Symbol] Returns the type of an argument. The types can be
    #   either: `:arg`, `:flag`, `:option`.
    #
    # source://claide//lib/claide/argv.rb#278
    def argument_type(argument); end

    # @example
    #
    #   list = parse(['tea', '--no-milk', '--sweetener=honey'])
    #   list # => [[:arg, "tea"],
    #   [:flag, ["milk", false]],
    #   [:option, ["sweetener", "honey"]]]
    # @return [Array<Array<Symbol, String, Array>>] A list of tuples for each
    #   parameter, where the first entry is the `type` and the second
    #   entry the actual parsed parameter.
    #
    # source://claide//lib/claide/argv.rb#259
    def parse(argv); end

    # @param type [Symbol] The type of the argument.
    # @param argument [String] The argument to check.
    # @return [String, Array<String, String>] Returns the argument itself for
    #   normal arguments (like commands) and a tuple with the key and
    #   the value for options and flags.
    #
    # source://claide//lib/claide/argv.rb#300
    def parse_argument(type, argument); end

    # @param argument [String] The flag argument to check.
    # @return [String, Array<String, String>] Returns the parameter
    #   describing a flag arguments.
    #
    # source://claide//lib/claide/argv.rb#317
    def parse_flag(argument); end
  end
end

# This class is used to represent individual arguments to present to
# the command help banner
#
# source://claide//lib/claide/argument.rb#7
class CLAide::Argument
  # @example
  #
  #   # A required parameter that can be either a NAME or URL
  #   Argument.new(%(NAME URL), true)
  # @param names [String, Array<String>] List of the names of each parameter alternatives.
  #   For convenience, if there is only one alternative for that
  #   parameter, we can use a String instead of a 1-item Array
  # @param required [Boolean] true if the parameter is required, false if it is optional
  # @param repeatable [Boolean] If true, the argument can appear multiple times in the command.
  #   In that case, an ellipsis will be appended after the argument
  #   in the help banner.
  # @return [Argument] a new instance of Argument
  #
  # source://claide//lib/claide/argument.rb#47
  def initialize(names, required, repeatable = T.unsafe(nil)); end

  # @param other [Argument] the Argument compared against
  # @return [Boolean] true on equality
  #
  # source://claide//lib/claide/argument.rb#57
  def ==(other); end

  # @return [Array<String>] List of alternate names for the parameters
  #
  # source://claide//lib/claide/argument.rb#14
  def names; end

  # @return [Boolean] Indicates if the argument is repeatable (= can appear multiple
  #   times in the command, which is indicated by '...' in the banner)
  #
  # source://claide//lib/claide/argument.rb#26
  def repeatable; end

  # @return [Boolean] Indicates if the argument is repeatable (= can appear multiple
  #   times in the command, which is indicated by '...' in the banner)
  #
  # source://claide//lib/claide/argument.rb#26
  def repeatable=(_arg0); end

  # @return [Boolean] Indicates if the argument is repeatable (= can appear multiple
  #   times in the command, which is indicated by '...' in the banner)
  #
  # source://claide//lib/claide/argument.rb#26
  def repeatable?; end

  # @return [Boolean] Indicates if the argument is required (not optional)
  #
  # source://claide//lib/claide/argument.rb#19
  def required; end

  # @return [Boolean] Indicates if the argument is required (not optional)
  #
  # source://claide//lib/claide/argument.rb#19
  def required=(_arg0); end

  # @return [Boolean] Indicates if the argument is required (not optional)
  #
  # source://claide//lib/claide/argument.rb#19
  def required?; end
end

# The string used for ellipsis / repeatable arguments in the banner
#
# source://claide//lib/claide/argument.rb#10
CLAide::Argument::ELLIPSIS = T.let(T.unsafe(nil), String)

# This class is used to build a command-line interface
#
# Each command is represented by a subclass of this class, which may be
# nested to create more granular commands.
#
# Following is an overview of the types of commands and what they should do.
#
# ### Any command type
#
# * Inherit from the command class under which the command should be nested.
# * Set {Command.summary} to a brief description of the command.
# * Override {Command.options} to return the options it handles and their
#   descriptions and prepending them to the results of calling `super`.
# * Override {Command#initialize} if it handles any parameters.
# * Override {Command#validate!} to check if the required parameters the
#   command handles are valid, or call {Command#help!} in case they’re not.
#
# ### Abstract command
#
# The following is needed for an abstract command:
#
# * Set {Command.abstract_command} to `true`.
# * Subclass the command.
#
# When the optional {Command.description} is specified, it will be shown at
# the top of the command’s help banner.
#
# ### Normal command
#
# The following is needed for a normal command:
#
# * Set {Command.arguments} to the description of the arguments this command
#   handles.
# * Override {Command#run} to perform the actual work.
#
# When the optional {Command.description} is specified, it will be shown
# underneath the usage section of the command’s help banner. Otherwise this
# defaults to {Command.summary}.
#
# source://claide//lib/claide/command/banner.rb#4
class CLAide::Command
  # Subclasses should override this method to remove the arguments/options
  # they support from `argv` _before_ calling `super`.
  #
  # The `super` implementation sets the {#verbose} attribute based on whether
  # or not the `--verbose` option is specified; and the {#ansi_output}
  # attribute to `false` if {Command.ansi_output} returns `true`, but the
  # user specified the `--no-ansi` option.
  #
  # @param argv [ARGV, Array] A list of (user-supplied) params that should be handled.
  # @return [Command] a new instance of Command
  #
  # source://claide//lib/claide/command.rb#521
  def initialize(argv); end

  # Set to `true` if {Command.ansi_output} returns `true` and the user
  # did **not** specify the `--no-ansi` option.
  #
  # @note If you want to make use of this value for your own configuration, you
  #   should check the value _after_ calling the `super` {Command#initialize}
  #   implementation.
  # @return [Boolean] Whether or not to use ANSI codes to prettify output. For instance, by
  #   default {InformativeError} exception messages will be colored red and
  #   subcommands in help banners green.
  #
  # source://claide//lib/claide/command.rb#497
  def ansi_output; end

  # Set to `true` if {Command.ansi_output} returns `true` and the user
  # did **not** specify the `--no-ansi` option.
  #
  # @note If you want to make use of this value for your own configuration, you
  #   should check the value _after_ calling the `super` {Command#initialize}
  #   implementation.
  # @return [Boolean] Whether or not to use ANSI codes to prettify output. For instance, by
  #   default {InformativeError} exception messages will be colored red and
  #   subcommands in help banners green.
  #
  # source://claide//lib/claide/command.rb#497
  def ansi_output=(_arg0); end

  # Set to `true` if {Command.ansi_output} returns `true` and the user
  # did **not** specify the `--no-ansi` option.
  #
  # @note If you want to make use of this value for your own configuration, you
  #   should check the value _after_ calling the `super` {Command#initialize}
  #   implementation.
  # @return [Boolean] Whether or not to use ANSI codes to prettify output. For instance, by
  #   default {InformativeError} exception messages will be colored red and
  #   subcommands in help banners green.
  #
  # source://claide//lib/claide/command.rb#497
  def ansi_output?; end

  # Handles root commands options if appropriate.
  #
  # @param argv [ARGV] The parameters of the command.
  # @return [Bool] Whether any root command option was handled.
  #
  # source://claide//lib/claide/command.rb#288
  def handle_root_options(argv); end

  # Set to `true` if initialized with a `--help` flag
  #
  # @return [Boolean] Whether the command was initialized with argv containing --help
  #
  # source://claide//lib/claide/command.rb#506
  def help?; end

  # Set to `true` if initialized with a `--help` flag
  #
  # @return [Boolean] Whether the command was initialized with argv containing --help
  #
  # source://claide//lib/claide/command.rb#506
  def help_arg; end

  # Set to `true` if initialized with a `--help` flag
  #
  # @return [Boolean] Whether the command was initialized with argv containing --help
  #
  # source://claide//lib/claide/command.rb#506
  def help_arg=(_arg0); end

  # @return [Bool] Whether the command was invoked by an abstract command by
  #   default.
  #
  # source://claide//lib/claide/command.rb#550
  def invoked_as_default; end

  # @return [Bool] Whether the command was invoked by an abstract command by
  #   default.
  #
  # source://claide//lib/claide/command.rb#550
  def invoked_as_default=(_arg0); end

  # @return [Bool] Whether the command was invoked by an abstract command by
  #   default.
  #
  # source://claide//lib/claide/command.rb#550
  def invoked_as_default?; end

  # Prints the version of the command optionally including plugins.
  #
  # source://claide//lib/claide/command.rb#299
  def print_version; end

  # This method should be overridden by the command class to perform its
  # work.
  #
  # @return [void]
  #
  # source://claide//lib/claide/command.rb#579
  def run; end

  # Raises a Help exception if the `--help` option is specified, if `argv`
  # still contains remaining arguments/options by the time it reaches this
  # implementation, or when called on an ‘abstract command’.
  #
  # Subclasses should call `super` _before_ doing their own validation. This
  # way when the user specifies the `--help` flag a help banner is shown,
  # instead of possible actual validation errors.
  #
  # @raise [Help]
  # @return [void]
  #
  # source://claide//lib/claide/command.rb#565
  def validate!; end

  # Set to `true` if the user specifies the `--verbose` option.
  #
  # @note If you want to make use of this value for your own configuration, you
  #   should check the value _after_ calling the `super` {Command#initialize}
  #   implementation.
  # @return [Boolean] Wether or not backtraces should be included when presenting the user an
  #   exception that includes the {InformativeError} module.
  #
  # source://claide//lib/claide/command.rb#483
  def verbose; end

  # Set to `true` if the user specifies the `--verbose` option.
  #
  # @note If you want to make use of this value for your own configuration, you
  #   should check the value _after_ calling the `super` {Command#initialize}
  #   implementation.
  # @return [Boolean] Wether or not backtraces should be included when presenting the user an
  #   exception that includes the {InformativeError} module.
  #
  # source://claide//lib/claide/command.rb#483
  def verbose=(_arg0); end

  # Set to `true` if the user specifies the `--verbose` option.
  #
  # @note If you want to make use of this value for your own configuration, you
  #   should check the value _after_ calling the `super` {Command#initialize}
  #   implementation.
  # @return [Boolean] Wether or not backtraces should be included when presenting the user an
  #   exception that includes the {InformativeError} module.
  #
  # source://claide//lib/claide/command.rb#483
  def verbose?; end

  protected

  # Print banner and exit
  #
  # @note Calling this method exits the current process.
  # @return [void]
  #
  # source://claide//lib/claide/command.rb#618
  def banner!; end

  # @param error_message [String] A custom optional error message
  # @raise [Help] Signals CLAide that a help banner for this command should be shown,
  #   with an optional error message.
  # @return [void]
  #
  # source://claide//lib/claide/command.rb#608
  def help!(error_message = T.unsafe(nil)); end

  # Returns the class of the invoked command
  #
  # @return [Command]
  #
  # source://claide//lib/claide/command.rb#590
  def invoked_command_class; end

  class << self
    # @return [Boolean] Indicates whether or not this command can actually
    #   perform work of itself, or that it only contains subcommands.
    #
    # source://claide//lib/claide/command.rb#52
    def abstract_command; end

    # @return [Boolean] Indicates whether or not this command can actually
    #   perform work of itself, or that it only contains subcommands.
    #
    # source://claide//lib/claide/command.rb#52
    def abstract_command=(_arg0); end

    # @return [Boolean] Indicates whether or not this command can actually
    #   perform work of itself, or that it only contains subcommands.
    #
    # source://claide//lib/claide/command.rb#52
    def abstract_command?; end

    # @return [Boolean] The default value for {Command#ansi_output}. This
    #   defaults to `true` if `STDOUT` is connected to a TTY and
    #   `String` has the instance methods `#red`, `#green`, and
    #   `#yellow` (which are defined by, for instance, the
    #   [colored](https://github.com/defunkt/colored) gem).
    #
    # source://claide//lib/claide/command.rb#127
    def ansi_output; end

    # Sets the attribute ansi_output
    #
    # @param value the value to set the attribute ansi_output to.
    #
    # source://claide//lib/claide/command.rb#133
    def ansi_output=(_arg0); end

    # @return [Boolean] The default value for {Command#ansi_output}. This
    #   defaults to `true` if `STDOUT` is connected to a TTY and
    #   `String` has the instance methods `#red`, `#green`, and
    #   `#yellow` (which are defined by, for instance, the
    #   [colored](https://github.com/defunkt/colored) gem).
    #
    # source://claide//lib/claide/command.rb#127
    def ansi_output?; end

    # @return [Array<Argument>] A list of arguments the command handles. This is shown
    #   in the usage section of the command’s help banner.
    #   Each Argument in the array represents an argument by its name
    #   (or list of alternatives) and whether it's required or optional
    #
    # source://claide//lib/claide/command.rb#98
    def arguments; end

    # @param arguments [Array<Argument>] An array listing the command arguments.
    #   Each Argument object describe the argument by its name
    #   (or list of alternatives) and whether it's required or optional
    # @todo Remove deprecation
    #
    # source://claide//lib/claide/command.rb#109
    def arguments=(arguments); end

    # Handle deprecated form of self.arguments as an
    # Array<Array<(String, Symbol)>> like in:
    #
    #   self.arguments = [ ['NAME', :required], ['QUERY', :optional] ]
    #
    # @todo Remove deprecated format support
    #
    # source://claide//lib/claide/command.rb#631
    def arguments_array=(arguments); end

    # Handle deprecated form of self.arguments as a String, like in:
    #
    #   self.arguments = 'NAME [QUERY]'
    #
    # @todo Remove deprecated format support
    #
    # source://claide//lib/claide/command.rb#647
    def arguments_string=(arguments); end

    # Returns the banner for the command.
    #
    # @param banner_class [Class] The class to use to format help banners.
    # @return [String] The banner for the command.
    #
    # source://claide//lib/claide/command.rb#451
    def banner(banner_class = T.unsafe(nil)); end

    # Print banner and exit
    #
    # @note Calling this method exits the current process.
    # @return [void]
    #
    # source://claide//lib/claide/command.rb#463
    def banner!; end

    # @return [String] The name of the command. Defaults to a snake-cased
    #   version of the class’ name.
    #
    # source://claide//lib/claide/command.rb#139
    def command; end

    # Sets the attribute command
    #
    # @param value the value to set the attribute command to.
    #
    # source://claide//lib/claide/command.rb#144
    def command=(_arg0); end

    # @return [String] The subcommand which an abstract command should invoke
    #   by default.
    #
    # source://claide//lib/claide/command.rb#70
    def default_subcommand; end

    # @return [String] The subcommand which an abstract command should invoke
    #   by default.
    #
    # source://claide//lib/claide/command.rb#70
    def default_subcommand=(_arg0); end

    # @return [String] A longer description of the command, which is shown
    #   underneath the usage section of the command’s help banner. Any
    #   indentation in this value will be ignored.
    #
    # source://claide//lib/claide/command.rb#81
    def description; end

    # @return [String] A longer description of the command, which is shown
    #   underneath the usage section of the command’s help banner. Any
    #   indentation in this value will be ignored.
    #
    # source://claide//lib/claide/command.rb#81
    def description=(_arg0); end

    # Searches the list of subcommands that should not be ignored for command
    # lookup for a subcommand with the given `name`.
    #
    # @param name [String] The name of the subcommand to be found.
    # @return [CLAide::Command, nil] The subcommand, if found.
    #
    # source://claide//lib/claide/command.rb#210
    def find_subcommand(name); end

    # @example
    #
    #   BevarageMaker::Tea.full_command # => "beverage-maker tea"
    # @return [String] The full command up-to this command, as it would be
    #   looked up during parsing.
    #
    # source://claide//lib/claide/command.rb#163
    def full_command; end

    # Presents an exception to the user in a short manner in case of an
    # `InformativeError` or in long form in other cases,
    #
    # @param command [Command, nil] The command from where the exception originated.
    # @param exception [Object] The exception to present.
    # @return [void]
    #
    # source://claide//lib/claide/command.rb#387
    def handle_exception(command, exception); end

    # @param error_message [String] The error message to show to the user.
    # @param help_class [Class] The class to use to raise a ‘help’ error.
    # @raise [Help] Signals CLAide that a help banner for this command should be shown,
    #   with an optional error message.
    # @return [void]
    #
    # source://claide//lib/claide/command.rb#438
    def help!(error_message = T.unsafe(nil), help_class = T.unsafe(nil)); end

    # @return [Boolean] Indicates whether or not this command is used during
    #   command parsing and whether or not it should be shown in the
    #   help banner or to show its subcommands instead.
    #
    #   Setting this to `true` implies it’s an abstract command.
    #
    # source://claide//lib/claide/command.rb#61
    def ignore_in_command_lookup; end

    # source://claide//lib/claide/command.rb#63
    def ignore_in_command_lookup=(flag); end

    # @return [Boolean] Indicates whether or not this command is used during
    #   command parsing and whether or not it should be shown in the
    #   help banner or to show its subcommands instead.
    #
    #   Setting this to `true` implies it’s an abstract command.
    #
    # source://claide//lib/claide/command.rb#61
    def ignore_in_command_lookup?; end

    # Automatically registers a subclass as a subcommand.
    #
    # source://claide//lib/claide/command.rb#218
    def inherited(subcommand); end

    # Convenience method.
    # Instantiate the command and run it with the provided arguments at once.
    #
    # CLAide::Command::run, it does not load plugins nor exit on failure.
    # It is up to the caller to rescue any possible exception raised.
    #
    # @note This method validate! the command before running it, but contrary to
    # @param args [String..., Array<String>] The arguments to initialize the command with
    # @raise [Help] If validate! fails
    #
    # source://claide//lib/claide/command.rb#541
    def invoke(*args); end

    # @param argv [Array, ARGV] A list of (remaining) parameters.
    # @return [Command] Returns the default subcommand initialized with the
    #   given arguments.
    #
    # source://claide//lib/claide/command.rb#366
    def load_default_subcommand(argv); end

    # Should be overridden by a subclass if it handles any options.
    #
    # The subclass has to combine the result of calling `super` and its own
    # list of options. The recommended way of doing this is by concatenating
    # to this classes’ own options.
    #
    # @example
    #
    #   def self.options
    #   [
    #   ['--verbose', 'Print more info'],
    #   ['--help',    'Print help banner'],
    #   ].concat(super)
    #   end
    # @return [Array<Array>] A list of option name and description tuples.
    #
    # source://claide//lib/claide/command.rb#251
    def options; end

    # @param argv [Array, ARGV] A list of (remaining) parameters.
    # @return [Command] An instance of the command class that was matched by
    #   going through the arguments in the parameters and drilling down
    #   command classes.
    #
    # source://claide//lib/claide/command.rb#347
    def parse(argv); end

    # Handle depracted form of assigning a plugin prefix.
    #
    # @todo Remove deprecated form.
    #
    # source://claide//lib/claide/command.rb#663
    def plugin_prefix=(prefix); end

    # @return [Array<String>] The prefixes used to search for CLAide plugins.
    #   Plugins are loaded via their `<plugin_prefix>_plugin.rb` file.
    #   Defaults to search for `claide` plugins.
    #
    # source://claide//lib/claide/command.rb#87
    def plugin_prefixes; end

    # Sets the attribute plugin_prefixes
    #
    # @param value the value to set the attribute plugin_prefixes to.
    #
    # source://claide//lib/claide/command.rb#90
    def plugin_prefixes=(_arg0); end

    # Allows the application to perform custom error reporting, by overriding
    # this method.
    #
    # @param exception [Exception] An exception that occurred while running a command through
    #   {Command.run}.
    # @raise By default re-raises the specified exception.
    # @return [void]
    #
    # source://claide//lib/claide/command.rb#414
    def report_error(exception); end

    # @return [Bool] Whether this is the root command class
    #
    # source://claide//lib/claide/command.rb#177
    def root_command?; end

    # Instantiates the command class matching the parameters through
    # {Command.parse}, validates it through {Command#validate!}, and runs it
    # through {Command#run}.
    #
    # @note The ANSI support is configured before running a command to allow
    #   the same process to run multiple commands with different
    #   settings.  For example a process with ANSI output enabled might
    #   want to programmatically invoke another command with the output
    #   enabled.
    # @param argv [Array, ARGV] A list of parameters. For instance, the standard `ARGV` constant,
    #   which contains the parameters passed to the program.
    # @return [void]
    #
    # source://claide//lib/claide/command.rb#324
    def run(argv = T.unsafe(nil)); end

    # @return [Array<Class>] A list of all command classes that are nested
    #   under this command.
    #
    # source://claide//lib/claide/command.rb#184
    def subcommands; end

    # @return [Array<Class>] A list of command classes that are nested under
    #   this command _or_ the subcommands of those command classes in
    #   case the command class should be ignored in command lookup.
    #
    # source://claide//lib/claide/command.rb#192
    def subcommands_for_command_lookup; end

    # @return [String] A brief description of the command, which is shown
    #   next to the command in the help banner of a parent command.
    #
    # source://claide//lib/claide/command.rb#75
    def summary; end

    # @return [String] A brief description of the command, which is shown
    #   next to the command in the help banner of a parent command.
    #
    # source://claide//lib/claide/command.rb#75
    def summary=(_arg0); end

    # @return [String] The version of the command. This value will be printed
    #   by the `--version` flag if used for the root command.
    #
    # source://claide//lib/claide/command.rb#149
    def version; end

    # @return [String] The version of the command. This value will be printed
    #   by the `--version` flag if used for the root command.
    #
    # source://claide//lib/claide/command.rb#149
    def version=(_arg0); end

    private

    # Adds a new option for the current command.
    #
    # This method can be used in conjunction with overriding `options`.
    #
    # @example
    #
    #   option '--help', 'Print help banner '
    # @return [void]
    #
    # source://claide//lib/claide/command.rb#269
    def option(name, description); end
  end
end

# source://claide//lib/claide/command/argument_suggester.rb#5
class CLAide::Command::ArgumentSuggester
  # @param argument [String] The unrecognized argument for which to make a suggestion.
  # @param command_class [Class] The class of the command which encountered the unrecognized
  #   arguments.
  # @return [ArgumentSuggester] a new instance of ArgumentSuggester
  #
  # source://claide//lib/claide/command/argument_suggester.rb#13
  def initialize(argument, command_class); end

  # @return [Array<String>] The list of the valid arguments for a command
  #   according to the type of the argument.
  #
  # source://claide//lib/claide/command/argument_suggester.rb#21
  def possibilities; end

  # @return [String] Returns a suggested argument from `possibilities` based
  #   on the `levenshtein_distance` score.
  #
  # source://claide//lib/claide/command/argument_suggester.rb#33
  def suggested_argument; end

  # @return [String] Returns a message including a suggestion for the given
  #   suggestion.
  #
  # source://claide//lib/claide/command/argument_suggester.rb#42
  def suggestion; end

  class << self
    # Returns the Levenshtein distance between the given strings.
    # From: http://rosettacode.org/wiki/Levenshtein_distance#Ruby
    #
    # @param a [String] The first string to compare.
    # @param b [String] The second string to compare.
    # @return [Fixnum] The distance between the strings.
    #
    # source://claide//lib/claide/command/argument_suggester.rb#84
    def levenshtein_distance(a, b); end

    # Prettifies the given validation suggestion according to the type.
    #
    # @param suggestion [String] The suggestion to prettify.
    # @param argument_type [Type] The type of the suggestion: either `:command` or `:option`.
    # @return [String] A handsome suggestion.
    #
    # source://claide//lib/claide/command/argument_suggester.rb#64
    def prettify_suggestion(suggestion, argument_type); end
  end
end

# Creates the formatted banner to present as help of the provided command
# class.
#
# source://claide//lib/claide/command/banner.rb#8
class CLAide::Command::Banner
  # @param command [Class] @see command
  # @return [Banner] a new instance of Banner
  #
  # source://claide//lib/claide/command/banner.rb#15
  def initialize(command); end

  # @return [Class] The command for which the banner should be created.
  #
  # source://claide//lib/claide/command/banner.rb#11
  def command; end

  # @return [Class] The command for which the banner should be created.
  #
  # source://claide//lib/claide/command/banner.rb#11
  def command=(_arg0); end

  # @return [String] The banner for the command.
  #
  # source://claide//lib/claide/command/banner.rb#21
  def formatted_banner; end

  private

  # @return [Fixnum] The width of the largest command name or of the
  #   largest option name. Used to align all the descriptions.
  #
  # source://claide//lib/claide/command/banner.rb#203
  def compute_max_name_width; end

  # @return [String] The line describing a single entry (subcommand or
  #   option).
  #
  # source://claide//lib/claide/command/banner.rb#124
  def entry_description(name, description, name_width); end

  # @return [String] The section describing the options of the command.
  #
  # source://claide//lib/claide/command/banner.rb#113
  def formatted_options_description; end

  # @note The plus sign emphasizes the that the subcommands are added to
  #   the command. The square brackets conveys a sense of direction
  #   and indicates the gravitational force towards the default
  #   command.
  # @return [String] The section describing the subcommands of the command.
  #
  # source://claide//lib/claide/command/banner.rb#100
  def formatted_subcommand_summaries; end

  # @return [String] The section describing the usage of the command.
  #
  # source://claide//lib/claide/command/banner.rb#56
  def formatted_usage_description; end

  # @return [String] A decorated command description.
  #
  # source://claide//lib/claide/command/banner.rb#175
  def prettify_message(command, message); end

  # @return [String] A decorated textual representation of the option name.
  #
  # source://claide//lib/claide/command/banner.rb#155
  def prettify_option_name(name); end

  # @return [String] A decorated textual representation of the command.
  #
  # source://claide//lib/claide/command/banner.rb#161
  def prettify_signature(command, subcommand, argument); end

  # @return [String] A decorated textual representation of the subcommand
  #   name.
  #
  # source://claide//lib/claide/command/banner.rb#148
  def prettify_subcommand(name); end

  # @return [String] A decorated title.
  #
  # source://claide//lib/claide/command/banner.rb#141
  def prettify_title(title); end

  # @return [String] The signature of the command.
  #
  # source://claide//lib/claide/command/banner.rb#67
  def signature; end

  # @return [String] The arguments of the signature.
  #
  # source://claide//lib/claide/command/banner.rb#85
  def signature_arguments; end

  # @return [String] The subcommand indicator of the signature.
  #
  # source://claide//lib/claide/command/banner.rb#78
  def signature_sub_command; end

  # @return [Array<String>] The list of the subcommands to use in the
  #   banner.
  #
  # source://claide//lib/claide/command/banner.rb#194
  def subcommands_for_banner; end
end

# @return [Fixnum] The minimum between a name and its description.
#
# source://claide//lib/claide/command/banner.rb#48
CLAide::Command::Banner::DESCRIPTION_SPACES = T.let(T.unsafe(nil), Integer)

# @return [Fixnum] The maximum width of the text.
#
# source://claide//lib/claide/command/banner.rb#44
CLAide::Command::Banner::MAX_WIDTH = T.let(T.unsafe(nil), Integer)

# @return [Fixnum] The minimum between a name and its description.
#
# source://claide//lib/claide/command/banner.rb#52
CLAide::Command::Banner::SUBCOMMAND_BULLET_SIZE = T.let(T.unsafe(nil), Integer)

# @return [String] The indentation of the text.
#
# source://claide//lib/claide/command/banner.rb#40
CLAide::Command::Banner::TEXT_INDENT = T.let(T.unsafe(nil), Integer)

# source://claide//lib/claide/command/banner.rb#212
module CLAide::Command::Banner::TextWrapper
  class << self
    # @return [String] Lifted straight from ActiveSupport. Thanks guys!
    #
    # source://claide//lib/claide/command/banner.rb#275
    def strip_heredoc(string); end

    # @return [Fixnum] The width of the current terminal unless being piped.
    #
    # source://claide//lib/claide/command/banner.rb#288
    def terminal_width; end

    # @return [String] Lifted straight from ActionView. Thanks guys!
    #
    # source://claide//lib/claide/command/banner.rb#269
    def word_wrap(line, line_width); end

    # @param string [String] The string to format.
    # @param indent [Fixnum] The number of spaces to insert before the string.
    # @param max_width [Fixnum] The maximum width to use to format the string if the terminal
    #   is too wide.
    # @return [String] Wraps a formatted string (e.g. markdown) by stripping
    #   heredoc indentation and wrapping by word to the terminal width
    #   taking into account a maximum one, and indenting the string.
    #   Code lines (i.e. indented by four spaces) are not wrapped.
    #
    # source://claide//lib/claide/command/banner.rb#228
    def wrap_formatted_text(string, indent = T.unsafe(nil), max_width = T.unsafe(nil)); end

    # @param string [String] The string to indent.
    # @param indent [Fixnum] The number of spaces to insert before the string.
    # @param max_width [Fixnum] The maximum width to use to format the string if the terminal
    #   is too wide.
    # @return [String] Wraps a string to the terminal width taking into
    #   account the given indentation.
    #
    # source://claide//lib/claide/command/banner.rb#254
    def wrap_with_indent(string, indent = T.unsafe(nil), max_width = T.unsafe(nil)); end

    private

    # source://claide//lib/claide/command/banner.rb#295
    def calculate_terminal_width; end
  end
end

# source://claide//lib/claide/command.rb#226
CLAide::Command::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Array)

# source://claide//lib/claide/command.rb#222
CLAide::Command::DEFAULT_ROOT_OPTIONS = T.let(T.unsafe(nil), Array)

# Handles plugin related logic logic for the `Command` class.
#
# Plugins are loaded the first time a command run and are identified by the
# prefix specified in the command class. Plugins must adopt the following
# conventions:
#
# - Support being loaded by a file located under the
# `lib/#{plugin_prefix}_plugin` relative path.
# - Be stored in a folder named after the plugin.
#
# source://claide//lib/claide/command/plugin_manager.rb#15
class CLAide::Command::PluginManager
  class << self
    # @return [Array<Specification>] The RubyGems specifications for the
    #   installed plugins that match the given `plugin_prefix`.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#45
    def installed_specifications_for_prefix(plugin_prefix); end

    # @return [Array<Gem::Specification>] Loads plugins via RubyGems looking
    #   for files named after the `PLUGIN_PREFIX_plugin` and returns the
    #   specifications of the gems loaded successfully.
    #   Plugins are required safely.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#28
    def load_plugins(plugin_prefix); end

    # @return [Hash<String,Gem::Specification>] The loaded plugins,
    #   grouped by plugin prefix.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#19
    def loaded_plugins; end

    # @return [Array<[Gem::Specification, Array<String>]>] Returns an array of tuples containing the specifications and
    #   plugin files to require for a given plugin prefix.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#72
    def plugin_gems_for_prefix(prefix); end

    # @param exception [Exception] The exception to analyze.
    # @return [Array<String>] The list of the plugins whose root path appears
    #   in the backtrace of an exception.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#56
    def plugins_involved_in_exception(exception); end

    # Requires the given paths.
    # If any exception occurs it is caught and an
    # informative message is printed.
    #
    # @param paths [String] The paths to require.
    # @return [Bool] Whether requiring succeeded.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#89
    def safe_require(paths); end

    # @return [Array<Specification>] The RubyGems specifications for the
    #   loaded plugins.
    #
    # source://claide//lib/claide/command/plugin_manager.rb#38
    def specifications; end

    private

    # source://claide//lib/claide/command/plugin_manager.rb#107
    def full_require_paths_for(gemspec); end
  end
end

# The exception class that is raised to indicate a help banner should be
# shown while running {Command.run}.
#
# source://claide//lib/claide/help.rb#9
class CLAide::Help < ::StandardError
  include ::CLAide::InformativeError

  # @note If an error message is provided, the exit status, used to
  #   terminate the program with, will be set to `1`, otherwise a {Help}
  #   exception is treated as not being a real error and exits with `0`.
  # @param banner [String] @see banner
  # @param error_message [String] @see error_message
  # @return [Help] a new instance of Help
  #
  # source://claide//lib/claide/help.rb#29
  def initialize(banner, error_message = T.unsafe(nil)); end

  # command to show in the help.
  #
  # @return [String] The banner containing the usage instructions of the
  #
  # source://claide//lib/claide/help.rb#15
  def banner; end

  # @return [String] An optional error message that will be shown before the
  #   help banner.
  #
  # source://claide//lib/claide/help.rb#20
  def error_message; end

  # @return [String] The optional error message, colored in red if
  #   {Command.ansi_output} is set to `true`.
  #
  # source://claide//lib/claide/help.rb#38
  def formatted_error_message; end

  # @return [String] The optional error message, combined with the help
  #   banner of the command.
  #
  # source://claide//lib/claide/help.rb#54
  def message; end

  # @return [String]
  #
  # source://claide//lib/claide/help.rb#47
  def prettify_error_message(message); end
end

# Including this module into an exception class will ensure that when raised,
# while running {Command.run}, only the message of the exception will be
# shown to the user. Unless disabled with the `--verbose` flag.
#
# In addition, the message will be colored red, if {Command.ansi_output}
# is set to `true`.
#
# source://claide//lib/claide/informative_error.rb#11
module CLAide::InformativeError
  # source://claide//lib/claide/informative_error.rb#17
  def exit_status; end

  # @return [Numeric] The exist status code that should be used to terminate
  #   the program with. Defaults to `1`.
  #
  # source://claide//lib/claide/informative_error.rb#15
  def exit_status=(_arg0); end
end

# source://claide//lib/claide/ansi.rb#113
class String
  include ::Comparable

  # @example
  #
  #   "example".ansi.yellow #=> "\e[33mexample\e[39m"
  #   "example".ansi.on_red #=> "\e[41mexample\e[49m"
  #   "example".ansi.bold   #=> "\e[1mexample\e[21m"
  # @return [StringEscaper] An object which provides convenience methods to
  #   wrap the receiver in ANSI sequences.
  #
  # source://claide//lib/claide/ansi.rb#123
  def ansi; end
end