diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/porkbun/cli.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/porkbun/cli.py b/src/porkbun/cli.py index 5843f34..c4496d8 100644 --- a/src/porkbun/cli.py +++ b/src/porkbun/cli.py @@ -166,8 +166,8 @@ async def async_main(domains: list[str], api_key: str, secret_key: str, refresh: @click.option('--refresh', is_flag=True, help='Refresh data from API and update cache') @click.option('--clear-cache', is_flag=True, help='Clear the cache before running') @click.option('--debug', is_flag=True, help='Show detailed request/response information') -@click.option('--verbose', is_flag=True, help='Show progress bars for API requests') -def main(domains_file: Optional[Path], domains: tuple[str], api_key: Optional[str], secret_key: Optional[str], refresh: bool, clear_cache: bool, debug: bool, verbose: bool): +@click.option('-q', '--quiet', is_flag=True, help='Disable progress bars (show only JSON output)') +def main(domains_file: Optional[Path], domains: tuple[str], api_key: Optional[str], secret_key: Optional[str], refresh: bool, clear_cache: bool, debug: bool, quiet: bool): """Query domain pricing from Porkbun API. Accepts domains either from a file (one domain per line) or via -d/--domain flags. @@ -200,6 +200,8 @@ def main(domains_file: Optional[Path], domains: tuple[str], api_key: Optional[st domain_list = list(domains) resolved_api_key, resolved_secret_key = resolve_credentials(api_key, secret_key) + # Verbose is enabled by default, disabled with -q/--quiet + verbose = not quiet asyncio.run(async_main(domain_list, resolved_api_key, resolved_secret_key, refresh, clear_cache, debug, verbose)) |
