Class SmithyCli

java.lang.Object
software.amazon.smithy.cli.SmithyCli

public final class SmithyCli extends Object
Entry point of the Smithy CLI.
  • Method Details

    • create

      public static SmithyCli create()
      Creates a new instance of the CLI.
      Returns:
      Returns the CLI instance.
    • main

      public static void main(String... args)
      Executes the CLI.
      Parameters:
      args - Arguments to parse and execute.
    • classLoader

      public SmithyCli classLoader(ClassLoader classLoader)
      Sets a custom class loader to use when executing commands.
      Parameters:
      classLoader - Class loader used to find models, traits, etc.
      Returns:
      Returns the CLI.
    • run

      public int run(List<String> args)
      Runs the CLI using a list of arguments.
      Parameters:
      args - Arguments to parse and execute.
      Returns:
      Returns the exit code.
    • run

      public int run(String... args)
      Runs the CLI.
      Parameters:
      args - Arguments to parse and execute.
      Returns:
      Returns the exit code.
    • createCli

      public Cli createCli()
      Creates a runnable CLI.
      Returns:
      Returns the created CLI.