CLI

Command-line interface for StatQA.

Main CLI

Command-line interface implementation.

Main CLI interface for tableqa.

Provides commands for: - Parsing codebooks - Running analyses - Generating Q/A pairs - Creating visualizations

statqa.cli.main.HAS_STATISTICAL_PARSER = False

True only when the parser can actually be constructed.

statqa.cli.main.version()[source]

Show version information.

Return type:

None

statqa.cli.main.parse_codebook(codebook_path=<typer.models.ArgumentInfo object>, output=<typer.models.OptionInfo object>, format=<typer.models.OptionInfo object>, enrich=<typer.models.OptionInfo object>, llm_provider=<typer.models.OptionInfo object>, api_key=<typer.models.OptionInfo object>)[source]

Parse a codebook and extract metadata.

Parameters:
  • codebook_path (Path)

  • output (Path)

  • format (Literal['auto', 'text', 'csv', 'statistical'])

  • enrich (bool)

  • llm_provider (Literal['openai', 'anthropic'])

  • api_key (str | None)

Return type:

None

statqa.cli.main.analyze(data_path=<typer.models.ArgumentInfo object>, codebook_path=<typer.models.ArgumentInfo object>, output_dir=<typer.models.OptionInfo object>, analyses=<typer.models.OptionInfo object>, max_bivariate_pairs=<typer.models.OptionInfo object>, generate_plots=<typer.models.OptionInfo object>)[source]

Run statistical analyses on dataset.

Parameters:
  • data_path (Path)

  • codebook_path (Path)

  • output_dir (Path)

  • analyses (str)

  • max_bivariate_pairs (int)

  • generate_plots (bool)

Return type:

None

statqa.cli.main.generate_qa(insights_path=<typer.models.ArgumentInfo object>, output=<typer.models.OptionInfo object>, use_llm=<typer.models.OptionInfo object>, llm_provider=<typer.models.OptionInfo object>, api_key=<typer.models.OptionInfo object>, export_format=<typer.models.OptionInfo object>)[source]

Generate Q/A pairs from analysis insights.

Parameters:
  • insights_path (Path)

  • output (Path)

  • use_llm (bool)

  • llm_provider (Literal['openai', 'anthropic'])

  • api_key (str | None)

  • export_format (Literal['jsonl', 'openai', 'anthropic'])

Return type:

None

statqa.cli.main.pipeline(data_path=<typer.models.ArgumentInfo object>, codebook_path=<typer.models.ArgumentInfo object>, output_dir=<typer.models.OptionInfo object>, generate_qa=<typer.models.OptionInfo object>, enrich_metadata=<typer.models.OptionInfo object>, api_key=<typer.models.OptionInfo object>)[source]

Run complete pipeline: parse → analyze → generate Q/A.

Parameters:
  • data_path (Path)

  • codebook_path (Path)

  • output_dir (Path)

  • generate_qa (bool)

  • enrich_metadata (bool)

  • api_key (str | None)

Return type:

None