@agentled/cli
Version:
CLI for Agentled — manage workflows, apps, and knowledge from the command line. Zero context-window cost for AI agents.
25 lines • 1.04 kB
JavaScript
import { AgentledClient } from '../client.js';
import { printError, printOutput } from '../utils/output.js';
export function registerIntentCommands(program) {
const intent = program.command('intent').description('Intent router operations');
intent
.command('do <query>')
.description('Resolve and optionally execute user intent')
.option('--execute', 'Auto-execute the matched workflow', false)
.option('--no-confirm', 'Skip confirmation prompt when executing')
.option('--format <fmt>', 'Output format', 'json')
.action(async (query, opts) => {
try {
const result = await new AgentledClient().resolveIntent(query, {
execute: opts.execute,
confirm: opts.confirm,
});
printOutput(result, opts.format);
}
catch (error) {
const message = error instanceof Error ? error.message : String(error);
printError(message);
}
});
}
//# sourceMappingURL=intent.js.map