"""Command line interface for Gobble"""


from click import command, argument, Path
from click import group

from gobble.fiscal import FiscalDataPackage


@group(name='gobble')
def cli():
    pass


@command(name='check')
@argument('filepath', type=Path(exists=True))
def validate(filepath):
    package = FiscalDataPackage(filepath)
    package.validate(raise_error=False)


cli.add_command(validate)