feat(cli): hide standalone scan from public help

This commit is contained in:
Andrey Avtomonov 2026-05-13 17:56:48 +02:00
parent 3371d41157
commit 44585b3f65
2 changed files with 3 additions and 2 deletions

View file

@ -39,7 +39,7 @@ function parseConnectionId(value: string): string {
export function registerScanCommands(program: Command, context: KtxCliCommandContext): void {
program
.command('scan')
.command('scan', { hidden: true })
.description('Run a standalone connection scan')
.argument('<connectionId>', 'KTX connection id to scan', parseConnectionId)
.option(

View file

@ -124,9 +124,10 @@ describe('runKtxCli', () => {
expect(testIo.stdout()).toContain('Usage: ktx [options] [command]');
expect(testIo.stdout()).toContain('KTX data agent context layer CLI');
for (const command of ['setup', 'connection', 'ingest', 'wiki', 'sl', 'status', 'scan']) {
for (const command of ['setup', 'connection', 'ingest', 'wiki', 'sl', 'status']) {
expect(testIo.stdout()).toContain(`${command}`);
}
expect(testIo.stdout()).not.toMatch(/^ scan\s/m);
for (const removed of ['demo', 'init', 'connect', 'ask', 'knowledge', 'agent', 'completion', 'serve']) {
expect(testIo.stdout()).not.toMatch(new RegExp(`^\\s+${removed}(?:\\s|\\[|$)`, 'm'));
}