# CLI Mixin

Each SciTeX package can add a standardized `docs` subcommand with minimal boilerplate using `scitex-dev`’s CLI mixin.

## Usage

    # List available doc pages
    scitex-writer docs --list

    # Get structured JSON (LLM-friendly)
    scitex-writer docs --json

    # Quick-start summary (< 20 lines)
    scitex-writer docs --tldr

    # Specific page
    scitex-writer docs --page api

    # Specific format
    scitex-writer docs --format json

## Integration (argparse)

    from scitex_dev.cli import register_docs_subcommand

    parser = argparse.ArgumentParser()
    subparsers = parser.add_subparsers()
    register_docs_subcommand(subparsers, package="scitex-writer")

## Integration (Click)

    from scitex_dev.cli import docs_click_group

    @click.group()
    def cli():
        pass

    cli.add_command(docs_click_group(package="scitex-writer"))

## API

scitex_dev.cli.register_docs_subcommand(subparsers: _SubParsersAction, package: str) → ArgumentParser

  Register `docs` with `list` and `get` verb subcommands.

  Usage::

    scitex-stats docs list # List doc pages scitex-stats docs get # Show available pages scitex-stats docs get api # Show specific page

scitex_dev.cli.docs_click_group(package: str, name: str = 'docs')

  Create a Click command group for docs (requires Click installed).

  Usage::

    from scitex_dev.cli import docs_click_group cli.add_command(docs_click_group(package=”scitex-writer”))