From 6ab408c1d3f562778645d04785baaa227422ddf1 Mon Sep 17 00:00:00 2001 From: MiliAxe Date: Wed, 31 Dec 2025 13:09:02 +0330 Subject: [PATCH] feat(cli): add option to display only the web panel URL --- core/cli.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/cli.py b/core/cli.py index 8518039..5c39552 100644 --- a/core/cli.py +++ b/core/cli.py @@ -670,10 +670,14 @@ def stop_webpanel_decoy(): click.echo(f'{e}', err=True) @cli.command('get-webpanel-url') -def get_web_panel_url(): +@click.option('--url-only', is_flag=True, help='Only display the URL without additional text') +def get_web_panel_url(url_only: bool): try: url = cli_api.get_webpanel_url() - click.echo(f'Hysteria web panel is now running. The service is accessible on: {url}') + if url_only: + click.echo(url) + else: + click.echo(f'Hysteria web panel is now running. The service is accessible on: {url}') except Exception as e: click.echo(f'{e}', err=True)