Add source files (main, cli, indexer modules)
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / build (push) Has been cancelled

This commit is contained in:
2026-02-03 02:36:43 +00:00
parent a2201e16ec
commit 918044ac35

View File

@@ -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."""