Files
FitTrack_GarminSync/cli/src/context.py
sstent 02fa8aa1eb feat: Add --debug option to CLI for verbose output
This commit introduces a global  option to the GarminSync CLI, providing verbose logging and diagnostic information for troubleshooting.

Key changes include:

- Implemented a  to manage and propagate the debug flag across CLI commands.

- Refactored  in  to accept and utilize the debug flag, enabling detailed logging of HTTP requests and responses.

- Updated CLI commands (, ) to access the  from the .

- Resolved circular import by extracting  into a dedicated  module.

- Configured  for Poetry-based dependency management.

- Addressed various  type hinting issues and  linting warnings across the CLI codebase to maintain code quality.
2025-12-22 06:39:40 -08:00

11 lines
314 B
Python

import click
from typing import Optional
from .api.client import ApiClient # Import ApiClient
class CliContext:
def __init__(self):
self.debug = False
self.api_client: Optional[ApiClient] = None # Store ApiClient instance
pass_cli_context = click.make_pass_decorator(CliContext, ensure=True)