Note: cli
Context
The cli module (src/attune_rag/cli.py) is the command-line entry point for debugging retrieval. It exposes two commands:
attune-rag query— runs a RAG query and prints the grounded answer with citations.attune-rag corpus-info— prints corpus statistics.
Content
The module contains two top-level functions; nothing needs to be instantiated before calling them:
build_parser() -> argparse.ArgumentParser— constructs and returns the argument parser for both subcommands.main(argv: list[str] | None = None) -> int— parses arguments and dispatches to the appropriate subcommand. WhenargvisNone, it reads fromsys.argv.
Because main() returns an integer exit code, it is suitable for use as a console_scripts entry point.
Tags: cli, query, corpus-info