Skip to content

Commit

Permalink
feat: Add stub for agent 'init' command
Browse files Browse the repository at this point in the history
  • Loading branch information
kgilpin committed Jul 26, 2021
1 parent 7f5fd02 commit 55d9fc8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/appland/appmap/cli/CLI.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ public class CLI {
public String directory;

public static void main(String[] args) {
int exitCode = new CommandLine(new CLI()).addSubcommand("status", Status.class).execute(args);
int exitCode = new CommandLine(new CLI())
.addSubcommand("status", Status.class)
.addSubcommand("init", Init.class)
.execute(args);
System.exit(exitCode);
}
}
15 changes: 15 additions & 0 deletions src/main/java/com/appland/appmap/cli/Init.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.appland.appmap.cli;

import picocli.CommandLine;
import java.util.concurrent.Callable;

@CommandLine.Command(name = "init", description = "Suggests AppMap configuration settings for a new project.")
public class Init implements Callable<Integer> {
@CommandLine.ParentCommand
private CLI parent;

public Integer call() throws Exception {
System.err.printf("Init AppMap project configuration in directory: %s", parent.directory);
return 0;
}
}

0 comments on commit 55d9fc8

Please sign in to comment.