paper-dynasty-card-creation/pd_cards/cli.py
Cal Corum 2e28d29ced Add pd-cards CLI skeleton with Typer
Introduces new pd-cards CLI tool for all card creation workflows:
- custom: manage fictional character cards via YAML profiles
- live-series: live season card updates (stub)
- retrosheet: historical data processing (stub)
- scouting: scouting report generation (stub)
- upload: S3 card image upload (stub)

Key features:
- Typer-based CLI with auto-generated help and shell completion
- YAML profiles for custom characters (replaces per-character Python scripts)
- Preview, submit, new, and list commands for custom cards
- First character migrated: Kalin Young

Install with: uv pip install -e .
Run with: pd-cards --help

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 16:08:32 -06:00

48 lines
1.2 KiB
Python

"""
Paper Dynasty Card Creation CLI.
Main entry point for all card creation workflows.
"""
import typer
from rich.console import Console
from pd_cards.commands import custom, live_series, retrosheet, scouting, upload
app = typer.Typer(
name="pd-cards",
help="Paper Dynasty card creation CLI - create player cards from statistics",
no_args_is_help=True,
)
console = Console()
# Register subcommands
app.add_typer(custom.app, name="custom", help="Custom character card management")
app.add_typer(live_series.app, name="live-series", help="Live season card updates")
app.add_typer(retrosheet.app, name="retrosheet", help="Historical Retrosheet data processing")
app.add_typer(scouting.app, name="scouting", help="Scouting report generation")
app.add_typer(upload.app, name="upload", help="Card image upload to S3")
@app.command()
def version():
"""Show pd-cards version."""
from pd_cards import __version__
console.print(f"pd-cards version {__version__}")
@app.callback()
def main():
"""
Paper Dynasty Card Creation CLI.
Create player cards from FanGraphs, Baseball Reference, and Retrosheet data,
or design custom fictional characters using archetypes.
"""
pass
if __name__ == "__main__":
app()