Package software.amazon.smithy.cli
Class SmithyCli
- java.lang.Object
- 
- software.amazon.smithy.cli.SmithyCli
 
- 
 public final class SmithyCli extends java.lang.ObjectEntry point of the Smithy CLI.
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SmithyCliclassLoader(java.lang.ClassLoader classLoader)Sets a custom class loader to use when executing commands.static SmithyClicreate()Creates a new instance of the CLI.ClicreateCli()Creates a runnable CLI.SmithyClidependencyResolverFactory(DependencyResolver.Factory dependencyResolverFactory)Sets a custom dependency resolver factory to use when resolving dependencies.static java.lang.StringgetVersion()Get the Smithy CLI version of the running CLI.static voidmain(java.lang.String... args)Executes the CLI.intrun(java.lang.String... args)Runs the CLI.intrun(java.util.List<java.lang.String> args)Runs the CLI using a list of arguments.
 
- 
- 
- 
Method Detail- 
createpublic static SmithyCli create() Creates a new instance of the CLI.- Returns:
- Returns the CLI instance.
 
 - 
mainpublic static void main(java.lang.String... args) Executes the CLI.- Parameters:
- args- Arguments to parse and execute.
 
 - 
classLoaderpublic SmithyCli classLoader(java.lang.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.
 
 - 
dependencyResolverFactorypublic SmithyCli dependencyResolverFactory(DependencyResolver.Factory dependencyResolverFactory) Sets a custom dependency resolver factory to use when resolving dependencies.Note that the CLI will automatically handle caching the resolved classpath and ensuring that resolved dependencies are consistent with the versions of JARs used by the CLI. - Parameters:
- dependencyResolverFactory- Factory to use when resolving dependencies.
- Returns:
- Returns the CLI.
 
 - 
runpublic int run(java.util.List<java.lang.String> args) Runs the CLI using a list of arguments.- Parameters:
- args- Arguments to parse and execute.
- Returns:
- Returns the exit code.
 
 - 
runpublic int run(java.lang.String... args) Runs the CLI.- Parameters:
- args- Arguments to parse and execute.
- Returns:
- Returns the exit code.
 
 - 
createClipublic Cli createCli() Creates a runnable CLI.- Returns:
- Returns the created CLI.
 
 - 
getVersionpublic static java.lang.String getVersion() Get the Smithy CLI version of the running CLI.- Returns:
- Returns the CLI version (e.g., "1.26.0").
 
 
- 
 
-