diff options
| author | Louis Burda <dev@sinitax.com> | 2026-01-30 09:28:27 +0100 |
|---|---|---|
| committer | Louis Burda <dev@sinitax.com> | 2026-01-30 09:28:27 +0100 |
| commit | 8dc3c9fc63c4d1c11adf1ec8c5c5f86e7ebf3585 (patch) | |
| tree | 33c065bb8aea1b54e9bb14c3ef3c99b27a755015 /src | |
| parent | 1f72a43f24942a05c572e071d83a711d7aeed5ed (diff) | |
| download | porkbun-py-main.tar.gz porkbun-py-main.zip | |
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)) |
