feat(fleet): add local canary CLI (#563)
This commit was merged in pull request #563.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { Command } from 'commander';
|
||||
import { registerFleetAgentCommands, type FleetCommandDeps } from './fleet.js';
|
||||
import { withAuth } from './with-auth.js';
|
||||
import { selectItem } from './select-dialog.js';
|
||||
import {
|
||||
@@ -30,11 +31,13 @@ function showAgentDetail(a: AgentConfigInfo) {
|
||||
console.log(` Created: ${new Date(a.createdAt).toLocaleString()}`);
|
||||
}
|
||||
|
||||
export function registerAgentCommand(program: Command) {
|
||||
export function registerAgentCommand(program: Command, fleetDeps: FleetCommandDeps = {}) {
|
||||
const cmd = program
|
||||
.command('agent')
|
||||
.description('Manage agent configurations')
|
||||
.description('Manage agent configurations and local fleet agents')
|
||||
.option('-g, --gateway <url>', 'Gateway URL', 'http://localhost:14242')
|
||||
.option('--mosaic-home <path>', 'Mosaic home directory')
|
||||
.option('--roster <path>', 'Local fleet roster path')
|
||||
.option('--list', 'List all agents')
|
||||
.option('--new', 'Create a new agent')
|
||||
.option('--show <idOrName>', 'Show agent details')
|
||||
@@ -72,6 +75,8 @@ export function registerAgentCommand(program: Command) {
|
||||
},
|
||||
);
|
||||
|
||||
registerFleetAgentCommands(cmd, fleetDeps);
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user