Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,18 +246,19 @@ export const buildCmd = (): Command => {
.option("-t, --test-target-id <id>", "Test target ID")
.action(deleteEnvironment);


program.command("start-private-location")
program
.command("start-private-location")
.description("Start a private location worker")
.option("-n, --name <name>", "Location name")
.option("-u, --username <username>", "Proxy user")
.option("-p, --password <password>", "Proxy password")
.option("-l, --host-network", "Use host network (default: false). If set you can use localhost directly", false)
.action(startPrivateLocationWorker);

program.command("stop-private-location")
program
.command("stop-private-location")
.description("Stop a private location worker")
.action(stopPLW)
.action(stopPLW);

createCommandWithCommonOptions("notifications")
.description("Get notifications for a test target")
Expand Down Expand Up @@ -304,5 +305,20 @@ export const buildCmd = (): Command => {
void createDiscovery(options);
});

program.command("cmd2json", { hidden: true }).action(() => {
const cmds = program.commands.map((cmd) => ({
name: cmd.name(),
description: cmd.description(),
options: cmd.options.map((option) => ({
name: option.name(),
description: option.description,
flags: option.flags,
required: option.required,
})),
args: cmd.args,
}));
console.log(JSON.stringify(cmds, null, 2));
});

return program;
};