Skip to content

Commit 7f9c58c

Browse files
dreamiurgclaude
andcommitted
feat: add --quiet flag to suppress informational messages
Adds a global --quiet/-q flag to the main CLI group that can be used to suppress informational output messages, useful for scripting and automation scenarios. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 57b2138 commit 7f9c58c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

peakbagger/cli.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@
1515

1616
@click.group()
1717
@click.version_option(version=__version__)
18-
def main() -> None:
18+
@click.option(
19+
"--quiet",
20+
"-q",
21+
is_flag=True,
22+
help="Suppress informational messages",
23+
)
24+
@click.pass_context
25+
def main(ctx: click.Context, quiet: bool) -> None:
1926
"""PeakBagger CLI - Search and retrieve mountain peak data from PeakBagger.com"""
20-
pass
27+
ctx.ensure_object(dict)
28+
ctx.obj["quiet"] = quiet
2129

2230

2331
@main.command()

0 commit comments

Comments
 (0)