From 918044ac35c1c537b37d48a7c3212226d206d0b9 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Tue, 3 Feb 2026 02:36:43 +0000 Subject: [PATCH] Add source files (main, cli, indexer modules) --- src/cli/commands.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cli/commands.py b/src/cli/commands.py index 4aa5d04..8c4909f 100644 --- a/src/cli/commands.py +++ b/src/cli/commands.py @@ -29,7 +29,7 @@ def cli(ctx, verbose): ctx.obj["verbose"] = verbose -@cli.command(name="index") +@click.command(name="index") @click.argument( "path", type=click.Path(exists=True, file_okay=True, dir_okay=True, path_type=Path) ) @@ -64,7 +64,7 @@ def index_command(ctx, path, type, recursive, batch_size): console.print("Try specifying a type: --type openapi|readme|code") -@cli.command(name="search") +@click.command(name="search") @click.argument("query", type=str) @click.option( "--limit", "-l", type=int, default=None, help="Maximum number of results" @@ -115,7 +115,7 @@ def search_command(ctx, query, limit, type, json, hybrid): console.print(f"\nFound {len(results)} result(s)") -@cli.command(name="list") +@click.command(name="list") @click.option( "--type", "-t", @@ -143,7 +143,7 @@ def list_command(ctx, type, json): console.print(table) -@cli.command(name="stats") +@click.command(name="stats") @click.pass_context def stats_command(ctx): """Show index statistics.""" @@ -159,7 +159,7 @@ def stats_command(ctx): console.print(table) -@cli.command(name="clear") +@click.command(name="clear") @click.option("--type", "-t", type=click.Choice(["openapi", "readme", "code"])) @click.option("--force", "-f", is_flag=True, help="Skip confirmation prompt") @click.pass_context @@ -189,7 +189,7 @@ def clear_command(ctx, type, force): console.print(format_success(f"Deleted {count} document(s)")) -@cli.command(name="config") +@click.command(name="config") @click.option("--show", is_flag=True, help="Show current configuration") @click.option("--reset", is_flag=True, help="Reset configuration to defaults") @click.pass_context @@ -221,7 +221,7 @@ def config_command(ctx, show, reset): console.print(panel) -@cli.command(name="interactive") +@click.command(name="interactive") @click.pass_context def interactive_command(ctx): """Enter interactive search mode."""