Links
AI / Agents
gdtest-cli-click
A test package with Click CLI support.
A package with Click CLI commands and cli.enabled=true in config. The sidebar should show a CLI Reference section alongside the API Reference. The CLI reference page should document the Click commands. The API Reference should show Formatter (class) and format_text (function).
Source files
gdtest_cli_click/
__init__.py
"""A package with Click CLI support."""
__version__ = "0.1.0"
__all__ = ["Formatter", "format_text"]
class Formatter:
"""
A text formatter.
Parameters
----------
style
The formatting style to use.
"""
def __init__(self, style: str = "default"):
self.style = style
def apply(self, text: str) -> str:
"""
Apply formatting to text.
Parameters
----------
text
The text to format.
Returns
-------
str
Formatted text.
"""
return text
def format_text(text: str, style: str = "default") -> str:
"""
Format text with a given style.
Parameters
----------
text
The text to format.
style
The style to apply.
Returns
-------
str
Formatted text.
"""
return Formatter(style).apply(text)cli.py
"""CLI entry point using Click."""
import click
@click.command()
@click.argument("text")
@click.option("--style", "-s", default="default", help="Formatting style.")
@click.option("--verbose", "-v", is_flag=True, help="Verbose output.")
def main(text: str, style: str, verbose: bool) -> None:
"""Format text using the gdtest-cli-click formatter."""
if verbose:
click.echo(f"Formatting with style: {style}")
click.echo(text)README.md
# gdtest-cli-click A test package with Click CLI support.
great-docs.yml
cli: enabled: true