Links
AI / Agents
gdtest-ref-section-order
A CLI-first test package demonstrating custom reference section ordering.
CLI-first package with ref_section_order: [cli, api, mcp] in config. The reference switcher tabs should appear CLI-first (cli,api) instead of the default (api,cli). The data-gd-ref-sections body attribute should be ‘cli,api’ since there is no MCP server.
Source files
gdtest_ref_section_order/
__init__.py
"""A CLI-first package with custom reference section ordering."""
__version__ = "0.1.0"
__all__ = ["run_task", "TaskConfig"]
class TaskConfig:
"""
Configuration for a task.
Parameters
----------
name
The task name.
timeout
Timeout in seconds.
"""
def __init__(self, name: str, timeout: int = 30):
self.name = name
self.timeout = timeout
def run_task(config: TaskConfig) -> str:
"""
Run a task with the given configuration.
Parameters
----------
config
The task configuration.
Returns
-------
str
Task result message.
"""
return f"Task {config.name} completed"cli.py
"""CLI entry point using Click."""
import click
@click.group()
def main() -> None:
"""gdtest-rso: a CLI-first tool for running tasks."""
@main.command()
@click.argument("name")
@click.option("--timeout", "-t", default=30, help="Timeout in seconds.")
def run(name: str, timeout: int) -> None:
"""Run a named task."""
click.echo(f"Running {name} (timeout={timeout}s)")
@main.command()
def list() -> None:
"""List available tasks."""
click.echo("task-a\ntask-b\ntask-c")README.md
# gdtest-ref-section-order A CLI-first test package demonstrating custom reference section ordering.
great-docs.yml
cli: enabled: true mcp: enabled: false ref_section_order: - cli - api