From d5b76bff67296d97c14b54225f06fb0a479dd383 Mon Sep 17 00:00:00 2001 From: Calvin Remsburg Date: Sat, 14 Mar 2026 04:24:49 -0500 Subject: [PATCH] fix: replace --config with inline flags for api-keys regenerate Co-Authored-By: Claude Opus 4.6 --- src/cli/commands/runtime.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/cli/commands/runtime.ts b/src/cli/commands/runtime.ts index 8ca5fc3..fc81c9c 100644 --- a/src/cli/commands/runtime.ts +++ b/src/cli/commands/runtime.ts @@ -439,13 +439,19 @@ export function registerRuntimeCommand(program: Command): void { apiKeys .command('regenerate ') .description('Regenerate an API key') - .requiredOption('--config ', 'JSON file with regeneration config') + .requiredOption('--interval ', 'Rotation time interval') + .requiredOption('--unit ', 'Rotation time unit (hours, days, months)') + .option('--updated-by ', 'Email of user performing regeneration') .action(async (apiKeyId: string, opts) => { try { renderRuntimeConfigHeader(); const service = await createMgmtService(); - const config = JSON.parse(fs.readFileSync(opts.config, 'utf-8')); - const key = await service.regenerateApiKey(apiKeyId, config); + const request: Record = { + rotation_time_interval: Number.parseInt(opts.interval, 10), + rotation_time_unit: opts.unit, + }; + if (opts.updatedBy) request.updated_by = opts.updatedBy; + const key = await service.regenerateApiKey(apiKeyId, request); console.log(` API key regenerated: ${key.id}\n`); renderApiKeyDetail(key); } catch (err) {