feat(cli): log the current command

This commit is contained in:
Benexl
2025-07-27 12:46:24 +03:00
parent dcbf0df1a0
commit abe36296c1

View File

@@ -1,3 +1,5 @@
import logging
import sys
from typing import TYPE_CHECKING
import click
@@ -26,6 +28,8 @@ if TYPE_CHECKING:
rich_traceback_theme: str
logger = logging.getLogger(__name__)
commands = {
"config": "config.config",
"search": "search.search",
@@ -74,6 +78,7 @@ def cli(ctx: click.Context, **options: "Unpack[Options]"):
options["rich_traceback_theme"],
)
logger.info(f"Current Command: {' '.join(sys.argv)}")
cli_overrides = {}
param_lookup = {p.name: p for p in ctx.command.params}