Skip to content

Commit 2d4dfa4

Browse files
adwsinghrhernandez35
authored andcommitted
Add Help subcommand
1 parent 86c99c9 commit 2d4dfa4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/McpCli.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import java.util.List;
99
import java.util.ServiceLoader;
1010
import picocli.CommandLine;
11+
import picocli.CommandLine.HelpCommand;
1112
import software.amazon.smithy.java.mcp.cli.commands.Configure;
1213
import software.amazon.smithy.java.mcp.cli.commands.CreateBundle;
1314
import software.amazon.smithy.java.mcp.cli.commands.CreateGenericBundle;
@@ -37,6 +38,7 @@ public static void main(String[] args) {
3738
.addSubcommand(new CreateGenericBundle());
3839
discoverCreateBundleCommands().forEach(createCommand::addSubcommand);
3940
var commandLine = new CommandLine(new McpRegistry())
41+
.addSubcommand(new HelpCommand())
4042
.addSubcommand(new StartServer())
4143
.addSubcommand(new ListBundles())
4244
.addSubcommand(new InstallBundle())

mcp/mcp-cli/src/main/java/software/amazon/smithy/java/mcp/cli/McpRegistry.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
package software.amazon.smithy.java.mcp.cli;
77

88
import picocli.CommandLine;
9+
import picocli.CommandLine.Command;
910

10-
@CommandLine.Command(name = "mcp-registry", versionProvider = VersionProvider.class, mixinStandardHelpOptions = true,
11+
@Command(name = "mcp-registry", versionProvider = VersionProvider.class, mixinStandardHelpOptions = true,
1112
scope = CommandLine.ScopeType.INHERIT)
1213
final class McpRegistry {}

0 commit comments

Comments
 (0)