1import typer
2from typing import Optional
3from .. import settings
4
5
6# Program
7
8program = typer.Typer()
9
10
11# Helpers
12
13
14def version(value: bool):
15    if value:
16        typer.echo(settings.VERSION)
17        raise typer.Exit()
18
19
20# Command
21
22
23@program.callback()
24def program_main(
25    version: Optional[bool] = typer.Option(None, "--version", callback=version)
26):
27    """Describe, extract, validate and transform tabular data."""
28    pass
29